Select from following answers:- Attach

- AcceptAllChanges
- AddObject
- All Above
In the Entity Framework, objects can be attached to or detached from an object context. Objects that are attached to an object context are tracked and managed by that object context. When a query is executed inside an object context in the Entity Framework, the returned objects are automatically attached to the object context. You can also attach objects that are obtained from a source other than a query to an object context. You can also attach objects that have been returned from a remote method call or web service by calling the Attach method.
The AddObject method adds an object and its related objects to the ObjectContext and sets the entity objects to the Added state. This is incorrect because the service method updates an existing Product entity; it does not add a new entity.
Show Correct Answer
Source: MeasureUp.Com | |
Alert Moderator