Following is the list of Client Object Model classes and their equivalent to Server Object Model classes:
Client Object Model | Server Object Model |
ClientContext | SPContext |
Site | SPSite |
Web | SPWeb |
List | SPList |
ListItem | SPListItem |
Field | SPField |
Example:
using Microsoft.SharePoint.Client;
private void SomeMethod()
{
ClientContext clientContext = new ClientContext(siteUrl);
Site siteCollection = clientContext.Site;
Web site = clientContext.Web;
}
Ref: http://msdn.microsoft.com/en-us/library/ee857094(office.14).aspx
No comments:
Post a Comment