public void Save(CustomerAggregate customer) { using (SalesEntities entities = new SalesEntities()) { entities.Customers.Attach( new Customer() { CustomerID = customer.CustomerID, CustomerName = customer.CustomerName, CustomerSince = customer.CustomerSince, Description = customer.Description } ); } }
public JsonResult Save(CustomerAggregate customer) { customerService.Save(customer); return Json(true); }