title: Best practice to lock a record for editing while using entity framework
body: <p>Not quite sure how to word this question but here it goes.  I am working on a project where multiple client applications are accessing one data source through a WCF service.  It may not be relevant but the WCF service is utilizing entity framework to access this data source.  Whenever a client has queried a record for editing, I would like to prevent that same record from being edited by the rest of the clients till the first client has completed their update.</p>
  
  <p>Correct me if I am wrong but I believe this is also known as synchronous and asynchronous data access.</p>
  
  <p>My question is, what is the industry best practice to implement this functionality. Is there a way to control this from the database side (Using SQL) or must it be done through the client? </p>
  
  <p>I have considered including a boolean 'EditMode' column for each table and simply setting it to true when it is being edited and check if that is set to true before allowing another client to access that record.</p>