Code Sample: AdventureWorks2008 ASP.NET Web Service

Applies to: SharePoint Server 2010

The AdventureWorks2008 ASP.NET Web Service sample shows how to use an ASP.NET Web service as an external system, which has its Web methods mapped to Business Data Connectivity (BDC) service stereotype methods in the BDC model file.

The Web service exposes methods for Create, Read, Update, and Delete (CRUD) operations on the SalesCustomer, SalesOrderHeader, and SalesOrderHeaderDetails entities and other operations that return data based on the relationships among these entities.

The BDC model defines the external system and the external content types (WSCustomer, WSSalesOrderHeader, and WSSalesOrderHeaderDetails), and maps the Web operations to the following BDC stereotype methods: Finder, SpecificFinder, Updater, Creator, and Deleter. The BDC model file can be found under the AdventureWorks2008 BDC Models folder and is named AdventureWorks2008WS.xml.

Prerequisites:

  • Internet Information Services (IIS)

  • Microsoft .NET Framework 3.5 Service Pack 1

  • Microsoft SharePoint Server 2010

  • Microsoft SQL Server 2008 (and SQL Management Studio)

Download and use the sample

  1. Download the Microsoft SharePoint 2010 Software Development Kit (SDK) from SharePoint 2010 Reference: Software Development Kit.

  2. Extract bcs sample kit.zip from the path %ProgramFiles%\Microsoft SDKs\SharePoint 2010\Samples\Business Connectivity Services to a local folder.

  3. In the folder where you extracted the files, locate the AdventureWorks2008 ASP.NET Web Service folder and open the Readme.htm file.

  4. Follow the instructions in Readme.htm to use the sample.