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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With