How to create Net Connectivity Assembly for SharePoint in BCS using Visual Studio




Today, we’ll learn to build BCS .Net Connectivity Assembly using Microsoft Visual Studio 2013 for SharePoint (In-Premises)

Let’s create a database ExternalDatabase in SQL Server with a table Employees. This has following columns:

  1. EmpNo – Primary Key, int type, not null
  2. EmpName – varchar(50), not null
  3. Department – varchar(50), not null
  4. Location – varchar(50), null
  5. Country – varchar(50), null


Let’s move to Visual Studio 2013 now.

Following are the steps:

  1. Create an Empty SharePoint project mapped with development SharePoint site and deploy as Farm solution option.
  2. Once Visual Studio solution is created, add new SharePoint item “Business Data Connectivity Model (Farm Solution)”. Provide name as ExternalEmployeeModel.



  1. Double click on ExternalEmployeeModel, it will open .bdcm file in design mode.
  2. Delete auto generated Entity and create new Entity named as ExternalEmployeeItem.
  3. Now add a new identifier “EmpNo” of type System.Int32
  4. Add new class file ExternalEmployeeItem.cs and open
  5. Add all properties corresponding to columns in SQL database table. It will look like screen shot below:
  6. Now it is a time to add BDC methods. Click ExternalEmployeeModel.bdcm then select BDC Method Details tab at bottom.
  7. Select your entity and add a finder method
  8. Under parameters, select returnParameter’s type descriptor “ExternalEmployeeList” and edit. It will launch BDC Explorer.
  9. Expand “ExternalEmployeeList” in BDC Explorer. Then expand “ExternalEmployeeItem” and add all properties same as the properties added in ExternalEmployeeItem class.
  10. In the same way add other methods into this entity. Below screen shot will guide you, how should it look like.

  1. Now we’ll set required BCS Custom Properties.

To add this property, click ExternalEmployeeModel in Solution Explorer.  In the Properties window, click on (Collection) next to Feature Properties and click the ellipsis (…) button. In the Feature Properties dialog, click Add.  Set the Key property to SiteUrl and the Value property to the URL you selected in the SharePoint Configuration Wizard when you created the project. (Note: this should be the same value as the Site URL property in the project properties)

Note: We have to set a BCS Custom Property to allow us to successfully deploy the BCS model.  For some reason, the SharePoint Configuration Wizard sets the Site URL project property, but doesn’t create the SiteUrl property in our Feature that is needed for successful deployment.

  1. Now we’ll set Title property of BCS Model. Next, we’ll set the Title field for the entity. If this BCS Custom Property is not set, any search results that are returned from this content source will have the name of the BCS Profile Page as the title, and they will all be identical.  This makes the search results less valid.

In the BDC Explorer tool window, click ExternalEmployeeItem under Model –> ExternalEmployeeModel –> ExternalEmployeeModel. Click (Collection) next to Custom Properties in the Properties tool window and click the elipsis (…) button.

  1. Deploy the project


Configuring External Content Type in BCS Service Application

Open up Central Administration on your SharePoint 2013 instance, and navigate to your BCS Service Application Instance.  (Central Admin –> Manage Service Applications).  If the .NET Connectivity Assembly has been successfully deployed, you will see the ExternalEmployeeItem entity listed in the table as below:

Click the checkbox next to the ExternalEmployeeItem entity in the table, and click the Configure button on the toolbar in the Profile Pages section. In the Configure External Content Type Profile Page Host select the SharePoint site where you want your ECT Profile Pages created. Click OK at the bottom of the popup window when done.

Check the checkbox next to ExternalEmployeeItem in the table and click Create/Upgrade in the Profile Pages section of the toolbar.

A Loading… popup window will appear while the profile pages are created.  When completed, an informational dialog will appear. Click OK. Another window will be displayed when the profile page has been successfully created.

Next, check the checkbox next to ExternalEmployeeItem again, and click Set Object Permissions in the Permissions section of the toolbar.

In the Set Object Permissions box, add appropriate permissions for the search service account, content access account, and any app pool accounts for any web applications that will be using, consuming, or displaying data from the ExternalEmployeeItem External Content Type.

Now you can create External list corresponding to this external content type and use CRUD (Create, Read, Update, Delete) operations on external data.

Like & Share…

Satyendra Mishra



THREE QUERIES offers easy access to information about SharePoint and associated technologies, project management, agile and scrum methodologies that helps developers, administrators, architects, technical managers, business analysts and end users. It has grown from there. We provide an important knowledge base for those involved in managing, architecture and developing software projects of all kinds. With weekly/daily exclusive updates, we keep you in touch with the latest business, management, technology thinking.

WE ARE CONNECTED ~ Follow us on social media to get regular updates and opinion on what's happening in the world of SharePoint, front-end, back end web technologies and project management. If you like this article, please share it and follow us at Facebook, Twitter, Instagram and LinkedIn

About Satyendra Mishra

Microsoft certified, motivated, energetic and accomplished SharePoint Consultant and Architect with 13+ years of work experience in Management, Architecture, Analytics, Development and Maintenance. He has been fortunate to be a part of over 20+ Web/Mobile/Software SharePoint and .Net projects delivery with various companies across different industry sectors. This has provided him a valuable insight and experience especially in successful implementation of technology solutions. Having very strong System Architecture, Technological, Management & Analytical Skills, Knowledge of Office 365, SharePoint, .Net, JavaScript, React, Angular, Azure, SQL. In 2016, he decided to start sharing the knowledge back to society in the form for content writing and blogging.
View all posts by Satyendra Mishra →

Leave a Reply

Your email address will not be published. Required fields are marked *