public static void Initialize(EBooksContext context) { if (!context.Suppliers.Any()) { context.Suppliers.Add( new Supplier() { CompanyName = "IBook", Description = "One of the best seller for e-books", Phone = "+375447682231", Email = "*****@*****.**", } ); context.SaveChanges(); } }
/// <summary> /// save changes method /// </summary> public void Save() { db.SaveChanges(); }