Office Document APIs for .NET
ITIL Career Advice
PMP Career Advice
Android Intel XDK
Welcome Guest !
You are implementing a method that uses Entity Framework POCO entities. This method creates a new Product entity and proxy by using the ObjectContext's CreateObject method. You need to ensure that the Product is added to the data source when you call the ObjectContext's SaveChanges method.
What should you do?
on 9/20/2012 | Category:
ADO.NET Interview questions
| Views: 1217 |
Select from following answers:
Call the ObjectContext's AddObject method.
Call the ObjectContext's Attach method.
Call the ObjectContext's DetectChanges method.
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
MeasureUp.Com | |
< Previous :
You are implementing a method that uses Entity Fra ...
Next > :
You are implementing a method named DeleteProduct. ...
Comments or Responses
Login to post response
More Interview Questions by Rajkatie
You are implementing a method named DeleteProduct. This method first r ...
You are implementing a method that uses Entity Framework-generated ent ...
You are implementing an Entity Framework application. A method retriev ...
You add code that modifies Entity Framework POCO entities with proxies ...
You add code that modifies Entity Framework entities. You need to use ...
You are developing a smart client application. Your code uses a strong ...
What is WinRT ?
Your application uses the following code to submit changes to a databa ...
Latest Interview Questions
What is GAC?
What makes a pattern?
What do you mean by Framework?
Tell some benefits of N-Tire architecture
What do you mean by Architectural Style?
List some of the architectural design principle
Tell us some of the importance of software architecture
Explain the 4+1 View Model