Upgrade Business Data Catalog files for using with Business Connectivity Services

BCS Meta Man has a great feature that allows you to upgrade a SharePoint 2007 Business Data Catalog application definition file to a SharePoint 2010 Business Connectivity Services model and .Net Assembly Connector. BCS Meta Man will read in the old XML, and generate all the new model and C# code for your External Content Types.

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

Prerequisites

  • SharePoint Foundation 2010 or SharePoint Server 2010
  • Visual Studio 2010 professional or higher
  • BCS Meta Man
  • Application definition file generated by BDC Meta Man.(In this walkthrough the application definition file contains two entities and an association between them).
  • AdventureWorks SQL database

Walkthrough

  1. Create a new BCS Meta Man project by selecting ‘SharePoint’ > ‘Lightning Tools (2010)’ , now you can select the BCS Meta Man project type.
  2. Click ‘OK’
  3. On the next dialog box, enter the name of where you want to deploy your model, and make sure you select ‘Deploy as a farm solution’ , click ‘Finish’

    Deploy it as a farm solution 

  4. When your BCS Meta Man diagram is open choose “Import Application Definition File” from the menu item.

    image

  5. From the file open dialog, choose the BDC application definition file which you have already generated using BDC Meta Man.

    select your Business Data Catalog file

  6. BCS Meta Man will generate the BCS external content types, C# methods and required files. In our sample we use a BDC application definition file that has an association between two entities. All this information has been imported to a BCS Model generated by BCS Meta Man.

    BCS Meta Man will generate External Content Types for you

  7. Now rebuild the project and press CTRL+F5 to deploy the solution.
  8. Go to your SharePoint 2010 site and add a BCS List and BCS Related List web part to your page. Set Department as the type for the List web part and Employee as the type for the Related List web part. Connect these two web parts so we can test the association methods.

    If you select a department in Department List it will populate employees from that department.

    Test the BCS Model in SharePoint 2010