public void UpdateCustomer(CustomerModel model) { using (var context = new CustomerDbContext()) { context.Customers.Update(model); context.SaveChanges(); } }
public void CreateCustomer(CustomerModel model) { using (var context = new CustomerDbContext()) { model.ID = Guid.NewGuid(); context.Customers.Add(model); context.SaveChanges(); } }