SharePoint 2013 CSOM API contains the following methods for accessing List object:
- ListCollection.GetById method - returns the list with the specified list identifier
- ListCollection.GetByTitle method - returns the list with the specified title from the collection
For example:
var listTitle = "Tasks";
using(var ctx = new ClientContext(webUrl))
{
var list = ctx.Web.Lists.GetByTitle(listTitle);
ctx.Load(list);
ctx.ExecuteQuery();
}
From another hand, SSOM API contains SPWeb.GetList method to gets the list that is associated with the specified server-relative URL.
The question is: how to effectively load List
by server-relative URL in CSOM?