Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




What is client wins and store wins mode in entity framework concurrency? ( .NET Entity framework interview questions with answers)

Client wins and store wins are actions which you would like to take when concurrency happens. 

In case you are new to concurrency please read this article first what is Concurrency? http://questpond.over-blog.com/article-can-you-explain-the-term-concurrency-c-interview-questions-with-answers-120291637.html.

In store wins / database wins the data from the server is loaded in to your entity objects. Client wins is opposite to stored wins, data from the entity object is saved to the database.

We need to use the “Refresh” method of the entity framework context and we need to use the “RefreshMode” enum for the same. Below is a simple code snippet which executes “ClientWins”.

i.Refresh(System.Data.Objects.RefreshMode.ClientWins,x);

Below is a great ADO.NET Entity framework interview question video created by www.questpond.com which shows how to do CRUD using Entity framework.

Helpful Website Url
http://www.questpond.com/
Share this article   |    Print    |    Article read by 8660 times
Author:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles: No related article
Related Interview Questions: No related interview question