Video -How to create object in JavaScript using the new operator – #JavaScriptin5minutes

In this video, you will learn, to create object in JavaScript using the new operator. Creating object using new operator is also known as using the CONSTRUCTOR PATTERN in JavaScript.

Leave your feedback in comment to improve the video further.

Video : One to one relationship between entities in Entity Framework Code First

Container.cs



namespace EFCodeFirstDemo.EFLib
{
   public class Container
    {
        public int ID { get; set; }
        public string ContainerName { get; set; }

        public virtual  Product product { get; set; }

    }
}


Product.cs


using System.ComponentModel.DataAnnotations;

namespace EFCodeFirstDemo.EFLib
{
   public class Product
    {
   
      // [ForeignKey("Container")]
        public int ID { get; set; }
        public string  ProductName { get; set; }

        public double  ProductPrice { get; set; }

        [Required]
        public virtual Container container { get; set; }
    }
}



EFContext.cs


using System.Data.Entity;

namespace EFCodeFirstDemo.EFLib
{
   public class EFContext : DbContext
    {
       public EFContext()
       {
           Database.SetInitializer<EFContext>(new DropCreateDatabaseIfModelChanges<EFContext>());
       }

       public DbSet<Product> Products { get; set; }
       public DbSet<Container> Containers { get; set; }
    }
}



Video: Optional Parameters in JavaScript Functions

Video: What is null and undefined in JavaScript?

Video: How to create Objects as literals in JavaScript

Video: How to create Objects using new operator in JavaScript

Video: How to create JavaScript Objects using Object.create

In this video you will learn about Optional Parameters in JavaScript functions.

Video: What is null and undefined in JavaScript?

Video: How to create Objects as literals in JavaScript

Video: How to create Objects using new operator in JavaScript

Video: How to create JavaScript Objects using Object.create

In this video you will learn about null and undefined in JavaScript. This video will explain similarity and differences between null and undefined