SharePoint 2013 List operations programmatically using CSOM
To perform operations programmatically SharePoint List using CSOM there are different operations on SharePoint List using CSOM below are the basic operations :-
After creating share point list first you need to create the columns if you are using custom column and then you can associate these columns to the list.
Coding blog to create a list for given site:-
After creating a list we need to associate the columns now if you are associating the column you need to see its lookup column or not if it’s a look up field then you need to change the xml field type. Coding blog to add field to list for given site:-
To read the list first you need to connect to the list and then you need to read items
Coding blog to get a list for given site:
To Query items in the giving list you can use CamlQuery, below is the example if we you want to retrieve student records. If you know the listItemId than below is the coding block to get ListItem.
You can use Caml Query to iterate or Query the list after CAML Query you will get List Item Collection which can be iterated. Below code base is the to use CAML Query
To update SharePoint List you need to get the list and update the attribute of list then by doing list list.Update() .
To delete the SharePoint List item you need to get the list item by title or by ID