public static void Initialize(TVContext context) { if (!context.TVs.Any()) { context.TVs.AddRange( new TV { Name = "Samsung UE55RU7172 ", Company = "Samsung", Price = 1500 }, new TV { Name = "Sony KD-55XG9505 ", Company = "Sony", Price = 1250 }, new TV { Name = "Vinga S50UHD20B", Company = "Vinga", Price = 1400 } ); context.SaveChanges(); } }
public static void Initialize(TVContext context) { if (!context.TVs.Any()) { context.TVs.AddRange( new TV { Name = "LG X54T-2019", Company = "LG", Price = 1000 }, new TV { Name = "Samsung UltraTV-v.3", Company = "Samsung", Price = 950 }, new TV { Name = "Sony XD-555", Company = "Sony", Price = 660 } ); context.SaveChanges(); } }