Select from following answers:- Call the ObjectContext's AddObject method.

- Call the ObjectContext's Attach method.
- Call the ObjectContext's DetectChanges method.
- All Above
Call AddObject on the ObjectContext to add the object to the object context. Do this when the object is a new object that does not yet exist in the data source.
Call the ObjectContext's Attach method to add a detached object to the ObjectContext and set the object to the Unchanged state. In the Unchanged state, the Entity Framework treats the entity key values as final. The attached entity will not have the Added state, and when SaveChanges is called, the object will not be inserted.
Show Correct Answer
Source: MeasureUp.Com | |
Alert Moderator