public static void Create(Customer customer)
 {
     using (var db = new NorthwindEntities())
     {
         db.Customers.Add(customer);
         db.SaveChanges();
     }
 }
Beispiel #2
0
        public static void Main(string[] args)
        {
            Customer customerTest = new Customer
            {
                CustomerID = "101",
                CompanyName = "This will be modify"
            };

            
            CustomerOperation.Create(customerTest);

            CustomerOperation.Update(customerTest.CustomerID, "This will be delete");

            CustomerOperation.Delete("delete");
        }