Looking to design your own external content type and deploy it as part of a SharePoint solution? Read on for a walkthrough on how to create one.
First up, the steps are the same for SharePoint 2010 and 2013 and have been carried out using Visual Studio 2012. Visual Studio 2010 will also work.
Before I start the walkthrough, I’ll summarise the goal of this post:
We have a very simple database that contains a couple of tables – Customer and Order. An external content type will be created and via a view on the database, will return a list of customers and their orders. The external content type will only allow read access to this information.
- There is a Business Data Connectivity service up and running on the SharePoint farm for the External Content Type (ECT) to be deployed to.
- The user deploying the solutions containing the ECT, in this case the user running Visual Studio, has adequate permissions to create it in the application service.
- This is just a demonstration, so there will be a distinct lack of logging, error handling and bad practices such as storing database credentials in plain text within the code, try to ignore this 🙂