Tag Archives: Using Visual Studio 2010 to Create BCS Applications

Using Visual Studio 2010 to Create BCS Applications

There are two ways to use Visual Studio to create BCS applications. The first is to build custom BCS models with the Business Data Connectivity Model, the second is to use Visual Studio to migrate declarative models built with SharePoint Designer for deployment via solution packages.

Business Data Connectivity Model

Visual Studio 2010 includes the Business Data Connectivity Model project template that you can use to create and use a .NET Assembly shim to any data store for use by BCS. Solutions based on the project template consist of a feature to install the model in BCS, an XML configuration file that is the model, and .NET classes that do the work of reading and writing data.

The XML model contains all of the information required to work with the .NET classes including method and type descriptors. This means that the associated .NET class’s methods and parameters must match the model.

At this point in the chapter you may have the strong impression that Microsoft really wants people to buy licenses to SharePoint Server if they need BCS. If so, it will not surprise you to discover that you must do some extra work to use this project template with SharePoint Foundation to support deployment to BCS.

Migrating Declarative Models to Visual Studio

You can use the Business Data Connectivity Model project template as a basis to migrate declarative models created in SharePoint Designer. Begin by using SharePoint Designer to export the model. Then create a Business Data Connectivity Model project and remove the default template items. Finally, add the exported model and replace the missing SharePoint Server specific feature receiver to deploy the model to SharePoint Foundation.

doug (frame 367 of smile clip)This post is an excerpt from the online courseware for our Microsoft SharePoint 2010 for Developers course written by expert Doug Ware.

Doug Ware is a SharePoint expert and an instructor for many of our SharePoint 2007 and SharePoint 2010 courses. A Microsoft MVP several times over, Doug is the leader of the Atlanta .NET User Group, one of the largest user groups in the Southeast U.S., and is a frequent speaker at code camps and other events. In addition to teaching and writing about SharePoint, Doug stays active as a consultant and has helped numerous organizations implement and customize SharePoint.