Server Object Model in SharePoint 2013
What is Object Model ? An object model is group of objects related to each other using Has-a Relationship. Let us See the below figure. You will get Clear idea on SharePoint Farm . Open visual studio 2012-->File-->New-->Select Console Application Template(Select Visual C# on Left Side)-->give Proper Name Click on Ok. Go to Build-->Configuration Manager-->select X64 at Activation Solution platform. One more Important Point Here You want to add reference--> Microsoft.sharePoint.dll Get All Web Applications in a Farm: Add Name Spaces: Using MicroSoft.SharePoint; Using MicroSoft.SharePoint.Administration SPFarm farm = SPFarm.Local; foreach (SPService service in farm.Services) { if (service is SPWebService) ...