Link to home
Start Free TrialLog in
Avatar of Dinesh Kumar
Dinesh KumarFlag for India

asked on

entity framework No LOCK

Does following entity framework code implements WITH (NOLOCK) by default.

if not how can I add it.

        public List<String> GetClientsList()
        {
            using (var context = new CMContainer())
            {
                return context.Clients.Select(col => col.ClientNo).ToList(); 
            }
        }

Open in new window


is this good option to follow i.e. WITH (NOLOCK)  when only 100 concurrent select is required and nothing else
ASKER CERTIFIED SOLUTION
Avatar of Naitik Gamit
Naitik Gamit
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dvnzdfhbjv jkopdgn kdqwjlnsf sf|
dvnzdfhbjv jkopdgn kdqwjlnsf sf|

interesante.

  return context.Clients.Select(col => col.ClientNo).ToList();
   transactionScope.Complete();  //complete the transaction scope