SharePoint Designer 2010 is great for creating relatively simple External Content Types. But what happens if you want to go from something simple and make it more complex by extending it further using a .Net Assembly Connector. If you are using the SharePoint Tools for Visual Studio 2010 you’ll need to start from scratch, but if you are using BCS Meta Man you can get it to open your SPD 2010 model and convert the methods to C# code for you!
- SharePoint Foundation 2010 or SharePoint Server 2010
- Visual Studio 2010 professional or higher
- SharePoint Designer 2010
- BCS Meta Man
- External Content Types created by SharePoint designer 2010
- AdventureWorks SQL database
- Create a new BCS Meta Man project by selecting ‘SharePoint’ > ‘Lightning Tools (2010)’ , now you can select the BCS Meta Man project type.
- Click ‘OK’
- 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’
- We need to export our external content types to an XML file so then we can upgrade them in BCS Meta Man. With SharePoint Designer 2010 open and while viewing the External Content Types, select and right click on the ones you want to upgrade and select Export Application Model.
- Set Model Name.
- Set where you want to save the model file to, and the file name
- Now we have our application model of external content types as an XML file. Next we will show you how to upgrade it in BCS Meta Man, which will generate C# methods for all the methods that you have defined in SharePoint Designer and also it will generate the associations between them as well.
- Open up your BCS Meta Man diagram and select import SPD Xml from the menu.
- A File open dialog will show. Select the xml file that you saved in step 4.
- BCS Meta Man will create External Content Types for all the ECTs that were created in SPD 2010 and exported. It will add new C# class files to your project so you can modify the C# methods that have been generated for each BCS method
- Rebuild the project and press CTRL+F5 to deploy the solution. You can now use your External Content Types that were originally designed in SharePoint Designer 2010 through a .Net Assembly Connector – woohoo