Compartilhar via


Code Sample: AdventureWorks2008 .NET Assembly

Applies to: SharePoint Server 2010

The AdventureWorks2008 .NET Assembly sample shows how to use a Microsoft .NET Framework assembly as an external system, which has its methods mapped to Business Data Connectivity (BDC) service stereotype methods in the BDC model file.

The .NET assembly exposes methods that perform Create, Read, Update, and Delete (CRUD) queries on products, product categories, product subcategories, and resellers on the AdventureWorks2008 sample database.

The BDC model defines the external system and the external content types, and maps the assembly methods 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 AdventureWorks2008NET.xml.

Prerequisites:

  • Microsoft .NET Framework 3.5 Service Pack 1

  • Microsoft SharePoint Server 2010

  • Microsoft SQL Server 2008

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 .NET Assembly folder and open the Readme.htm file.

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