Export and Deploy BDC model as a feature in Sharepoint


In this article we will be seeing how to export the BDC model using SharePoint Designer and deploy the BDC model as a feature using Visual Studio 2010.

In this article we will be performing the following steps:

  1. Export the BDC model using SharePoint Designer 2010
  2. Deploy the BDC model as a feature using Visual Studio 2010

Export the BDC model using SharePoint Designer 2010:

To create an external content types using SharePoint Designer refer http://msdn.microsoft.com/en-us/library/ee557243.aspx.

In this section we will be seeing how to export the BDC model using SharePoint Designer.

  1. Open SharePoint Designer 2010.
  2. Click on Open Site.

    ExDepBDC1.gif
     
  3. Enter the site URL and click on Open.
  4. Go to Navigation => External Content Types.

    ExDepBDC2.gif
     
  5. I have created an External content type named "ECT" as shown in the following

    ExDepBDC3.gif
     
  6. Right click on ECT and click on "Export BDC Model".

    ExDepBDC4.gif
     
  7. Enter the BDC Model Name and click on Ok.

    ExDepBDC5.gif
     
  8. You will be getting the following dialog box

    ExDepBDC6.gif
     
  9. Save the file.

    ExDepBDC7.gif

Deploy the BDC model as a feature using Visual Studio 2010:

  1. Open Visual Studio 2010.
  2. Go to File => New => Project.
  3. Select Business Data Connectivity Model from the installed templates.

    ExDepBDC8.gif
     
  4. Enter the Name and click on Ok.
  5. Enter the site URL for debugging and click on Finish.

    ExDepBDC9.gif
     
  6. By default the solution would have created BDCModel1 as shown in the following

    ExDepBDC10.gif
     
  7. Right click on BDCModel1 and click on delete.
  8. Right click on the solution, click on Add => Existing item => Add the BDC model that we have exported and saved it on the local machine.

    ExDepBDC11.gif
     
  9. "Add .Net assembly LobSystem" wizard will pop up, select No and click on Ok.

    ExDepBDC12.gif
     
  10. Entire solution looks like the following.

    ExDepBDC13.gif
     
  11. Ensure whether the scope of the feature is at Farm level.

    ExDepBDC14.gif
     
  12. Right click on the solution and click on Deploy.

    ExDepBDC15.gif
     
  13. Go to Central Administration => System Settings =>Farm Management =>Manage Farm Features.

    ExDepBDC16.gif
     
  14. Go to Central Administration => Application Management => Manage Service Applications => Business Connectivity Service Application> you could be able to see the external content type deployed.

    ExDepBDC17.gif

 

Up Next
    Ebook Download
    View all
    Learn
    View all