Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is exactly ClientRuntimeContext.Load Method doing

I am new in CSOM SharePoint and I was wondering if anyone could explain the differences between ClientRuntimeContext.Load and ClientRuntimeContext.ExecuteQuery and when I should use any of them?

like image 475
Mgu Avatar asked Oct 14 '25 16:10

Mgu


1 Answers

clientcontext.load loads the context with items that need to be fetched from the server. You can think of this as loading a magazine or a hopper. Usually it's required to load items that are associated with a fetch method, not a property

clientcontext.executequery will actually perform the fetch. You can think of this as pulling the trigger to fetch all the "loaded" items.

You can learn more about these methods on the MSDN page here

like image 195
Mike Avatar answered Oct 17 '25 06:10

Mike



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!