Creating External Lists Programmatically

Creating External Lists using SharePoint Designer 2010 or SharePoint 2010 UI is just a breeze. But what if you want to create them programmatically? There are two different ways you could do so: Using Object Model Using the SPWeb.Lists.Add method we can create an external list: SPListDataSource ds = new SPListDataSource(); ds.SetProperty(SPListDataSource.BDCProperties.LobSystemInstance, "Demo Customers"); ds.SetProperty(SPListDataSource.BDCProperties.EntityNamespace, […]