CSOM Linq styled helper
var op = SiteUrl
.Create(logger)
.SetOnlineCredentials(UserName, Password) // Available also with SecureString parameter
.Execute();
var op = SiteUrl
.Create(logger)
.SetOnlineCredentials(UserName, Password) // Available also with SecureString parameter
.Execute();
var listTitle = "Documents";
op.LoadList(listTitle, (context, list) =>
{
context.Load(list, l=>l.ItemCount);
});
var items = op.GetItems();
ClientContext context = new ClientContext(SiteUrl);
context.Credentials = new SharePointOnlineCredentials(UserName, Password.ToSecureString());
var listTitle = "Documents";
var items = context
.Create()
.LoadList(listTitle)
.GetItems();
logger.Info($"Total items of list {listTitle} with list.ItemCount: {items.Count}");