예제 #1
0
 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();
     }
 }
예제 #2
0
 /// <summary>
 /// save changes method
 /// </summary>
 public void Save()
 {
     db.SaveChanges();
 }