I am building an application based on Ria Services.
Among the default methods that were created by the Visual Studio wizard, I see those that need to insert and save new data.
For instance:
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 do not see this. In order to insert an object into the data warehouse, you need to call the ObjectContext.SaveChanges () object, which I read .... do I need to change these functions to save the information?
Thanks in advance, Hooray, Gianluca.
source share