I'm trying to call SharePoint from within a standard .NET class library. This will probably be hosted on a different server to SharePoint.
I just need to return an item from a list, and wondered if I needed to use the Client framework or if something like below would work:
using (SPSite site = new SPSite("http://sitecollection"))
{
using (SPWeb web = site.RootWeb)
{
SPList list = web.Lists["Image List"];
// Get item by name field value
}
}
I'm currently just referencing the Microsoft.SharePoint.dll