Today I presented at the TechFuse conference in Bloomington MN. My presentation was on how to build SharePoint 2010 customizations with no server access, which included SharePoint Designer 2010, Sandboxed Solutions, and the new Client Object Model. Below you'll find my slide deck and the source code I used in my presentation:
Client Side Object Model code we saw in our console application demo:
using (ClientContext context = new ClientContext(
"http://workflows.inaction.com"))
{
Web web = context.Web;
context.Load(web);
context.Load(web.Lists);
context.ExecuteQuery();
ListCollection lists = web.Lists;
foreach (List list in lists)
Console.WriteLine(list.Title);
List a = context.Web.Lists.GetByTitle(
"Announcements");
context.Load(a);
ListItem newitem = a.AddItem(new
ListItemCreationInformation());
newitem["Title"] = "NEW!!!!!";
newitem.Update();
context.ExecuteQuery();
}