none
Any references on how to insert data SharePoint list using CSOM with .Net Core RRS feed

  • Question

  • I need some code references using CSOM with .Net core , am kind of stuck any references appreciated.
    Friday, March 29, 2019 7:18 AM

Answers

  • Hi,

    You need to add the following reference for the CSOM to be accessed via .Net Core TTCUE.NetCore.SharepointOnline.CSOM.16.1.8029.1200

    and use the following reference 

    using Microsoft.SharePoint.Client;
    
    
      using (var clientContext = new ClientContext("url"))
                {
    
                    clientContext.Credentials = new SharePointOnlineCredentials("ID", password);
    
                    Web clientWeb = clientContext.Web;
                    List issuesList = clientWeb.Lists.GetByTitle("Issues");
                    CamlQuery camlQuery = new CamlQuery();
                    camlQuery.ViewXml = "camlquery";
                    ListItemCollection collListItem = issuesList.GetItems(camlQuery);
    
                    clientContext.Load(collListItem);
                    await clientContext.ExecuteQueryAsync();
                    return collListItem;
    
                }

    You can start with as reference


    Divya

    • Marked as answer by yvsanthi Friday, March 29, 2019 11:08 AM
    Friday, March 29, 2019 10:50 AM

All replies