Introduction: Business Connectivity Services (BCS) is a new service introduced with SharePoint 2010 to allow SharePoint sites to connect to and manipulate external data. SharePoint 2007 had a similar facility in the form of Business Data Catalog (BDC) which made external data available within its site. However, a major problem with BDC was the difficulty in creating solutions as there was no support in the 2007 designer. Most BDC solutions were simply for accessing external data, manipulating external data sources was extremely difficult. With SharePoint 2010, BCS ships with out-of-box features such as solutions, services, and tools which make connecting to external data an easy task. Whether you want to retrieve Outlook contacts in a list offline or edit the contents of your document file or share your excel sheet online or reuse data from dynamic InfoPath forms or just update your business presentation, BCS enables deep content sharing, editing and integration in SharePoint 2010 with SharePoint Designer and Visual Studio tools. Description SharePoint 2010 out-of-the-box exposes list data as OData feed. Here we will be consuming the OData feeds using Business Connectivity Services. We can retrieve the list data by the URL http://serverName:1111/_vti_bin/listdata.svc. We will be adding the service reference to the OData feed and will be generating the code in Visual Studio 2010. The following example shows how to create External Content Type based on SharePoint list. I have created a custom list named "Customers" which has the following data's. Prerequisites
Example Create SharePoint Solution based on Business Data Connectivity Model template:
Delete the default BDC Model:
Create a new BDC Model:
Modify Entity1.cs:
Modify the Entity:
ReadItem (Specific Finder Method):
ReadList (Finder Method):
Add Service Reference:
Modify CustomersService.cs:
Deploy the solution:
Configure Business Data Connectivity access rights:
Testing the solution:
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: