Do I need to call my domain service's context.SaveChanges after adding a new entity?
问题 I am building an application based on Ria Services. Amongst the default methods that were built by the Visual Studio Wizard, I can see the ones that should insert and persist new data. For example: public void InsertCustomer(Customer customer) { if ((customer.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(customer, EntityState.Added); } else { this.ObjectContext.Customers.AddObject(customer); } } However, I don't see any this.ObjectContext