Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

apply NoLock in Linq

$
0
0

Hi CRM Experts,

I have one below query to extract the contact from CRM:

OrganizationServiceContext DataContext = new OrganizationServiceContext(crmService);

var allContacts = from c in DataContext.CreateQuery("contact")
where (c.GetAttributeValue<OptionSetValue>("statecode").Value.Equals(0))
select new
{
id = c.GetAttributeValue<Guid>("contactid")
};
var contactslist = allContacts.ToList();

I need to apply NoLock in the above query but have no idea how I should do it. 

I really appreciate if anyone can provide me any help here.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>