Upgrade BDC application definition files to BCS

BCS Meta Man alpha 2 has a great feature that allows you to upgrade MOSS 2007 BDC application definition file to SharePoint 2010 BCS models. BCS Meta Man will automatically read in the BDC XML and create the appropriate BCS Model, BCS External Content Types and generate the necessary C# methods.

In this blog post we will show you how to upscale a BDC application definition file with BCS Meta Man.

In the first part of this blog post, we will show you how to generate a BDC application definition file with BDC Meta Man and then we will show how to upscale that application definition file with BCS Meta Man.

1) Open BDC Meta Man and connect to SQL server, use AdventureWorks database.

Open BDC Meta Man

2) Drag and Drop Department and Employee tables to the design surface, and create an association between those two tables.

Create Entities on design surface

3) Set the output file path.

Set Output file path

4) Generate the application definition file.

Generate BDC application definition file

Now the BDC application definition file is generated we need to create a SharePoint project in Visual Studio 2010, add a BCS Meta Man project item and upscale the BDC application definition file.

5) Open up Visual Studio 2010 and create new Empty SharePoint project.

Create empty SharePoint project

6) Add a BCS Meta Man project item to your project. Right click on the project, choose Add new item and select BCS Meta Man item from the dialog.

Add BCS Meta Man project item

7) When the project item is added to your project, BCS Meta Man’s design surface will be opened automatically. From the menu bar select BCS Meta Man – >Import BDC Xml File.

Select Import BDC Xml File menu option

8) From the file open dialog, choose the BDC application definition file which you have already generated

Select the application definition file to upgrade

9) BCS Meta Man will generate BCS external content types, C# methods and required files. All this information has been imported to BCS Model generated by BCS Meta Man.

BCS Meta Man upgrades our BDC XML to a BCS Model

10) Now rebuild the project and press CTRL+F5 to deploy the solution.

11) Go to your SharePoint site and add BCS List web part and BCS Related List web part to your page. Set Department as a type for List web part and Employee as a type for Related List web part, connect those two web parts together.

If you select a department in the Department List it will populate employees from that department. We’ve successfully upgraded our BDC XML to a BCS model and deployed it!

Test the upgrade by deploying model