{"id":1504,"date":"2013-08-09T16:21:47","date_gmt":"2013-08-09T15:21:47","guid":{"rendered":"http:\/\/www.stuartroberts.net\/?p=1504"},"modified":"2013-08-09T16:21:47","modified_gmt":"2013-08-09T15:21:47","slug":"external-content-type-walkthrough","status":"publish","type":"post","link":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/","title":{"rendered":"External Content Type Walkthrough"},"content":{"rendered":"<p>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.<\/p>\n<p>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.<\/p>\n<p>Before I start the walkthrough, I&#8217;ll summarise the goal of this post:<\/p>\n<p>We have a very simple database that contains a couple of tables &#8211; 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.<\/p>\n<p><strong>Assumptions<\/strong>:<\/p>\n<ul>\n<li>There is a Business Data Connectivity service up and running on the SharePoint farm for the External Content Type (ECT) to be deployed to.<\/li>\n<li>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.<\/li>\n<li>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 \ud83d\ude42<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>OK, let&#8217;s get going.<\/p>\n<p>Open Visual Studio and either load your existing SharePoint project or create a new one.<\/p>\n<p>The first thing we need to do is create the Business Data Connectivity Model, so go ahead and add one to your project.<\/p>\n<div id=\"attachment_1516\" style=\"width: 965px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewBDCModel.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1516\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewBDCModel.png\" alt=\"Add new BDC Model\" width=\"955\" height=\"660\" class=\"size-full wp-image-1516\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewBDCModel.png 955w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewBDCModel-300x207.png 300w\" sizes=\"auto, (max-width: 955px) 100vw, 955px\" \/><\/a><p id=\"caption-attachment-1516\" class=\"wp-caption-text\">Add new BDC Model<\/p><\/div>\n<p>Which will show something very similar to the following screenshot:<br \/>\n<div id=\"attachment_1517\" style=\"width: 429px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/InitialBDCModelDiagram.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1517\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/InitialBDCModelDiagram.png\" alt=\"Initial BDC Model Diagram\" width=\"419\" height=\"334\" class=\"size-full wp-image-1517\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/InitialBDCModelDiagram.png 419w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/InitialBDCModelDiagram-300x239.png 300w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/a><p id=\"caption-attachment-1517\" class=\"wp-caption-text\">Initial BDC Model Diagram<\/p><\/div><\/p>\n<p>It easier to start with a clean slate, so delete the existing entity from the diagram.<\/p>\n<div id=\"attachment_1519\" style=\"width: 357px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeleteEntity1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1519\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeleteEntity1.png\" alt=\"Delete Entity1\" width=\"347\" height=\"236\" class=\"size-full wp-image-1519\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeleteEntity1.png 347w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeleteEntity1-300x204.png 300w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/a><p id=\"caption-attachment-1519\" class=\"wp-caption-text\">Delete Entity1<\/p><\/div>\n<p>In the Solution Explorer pane, delete the Entity1 and Entity1Service classes.<\/p>\n<div id=\"attachment_1522\" style=\"width: 269px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeleteEntity1Classes.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1522\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeleteEntity1Classes.png\" alt=\"Delete Entity1 Classes\" width=\"259\" height=\"333\" class=\"size-full wp-image-1522\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeleteEntity1Classes.png 259w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeleteEntity1Classes-233x300.png 233w\" sizes=\"auto, (max-width: 259px) 100vw, 259px\" \/><\/a><p id=\"caption-attachment-1522\" class=\"wp-caption-text\">Delete Entity1 Classes<\/p><\/div>\n<p>Back in the Model, add a new entity.<\/p>\n<div id=\"attachment_1523\" style=\"width: 815px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewEntity.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1523\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewEntity.png\" alt=\"Add New Entity\" width=\"805\" height=\"338\" class=\"size-full wp-image-1523\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewEntity.png 805w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewEntity-300x125.png 300w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/a><p id=\"caption-attachment-1523\" class=\"wp-caption-text\">Add New Entity<\/p><\/div>\n<p>Next, rename it to CustomerOrders.<\/p>\n<div id=\"attachment_1524\" style=\"width: 713px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/RenameNewEntity.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1524\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/RenameNewEntity.png\" alt=\"Rename New Entity\" width=\"703\" height=\"335\" class=\"size-full wp-image-1524\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/RenameNewEntity.png 703w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/RenameNewEntity-300x142.png 300w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/a><p id=\"caption-attachment-1524\" class=\"wp-caption-text\">Rename New Entity<\/p><\/div>\n<p>Note the new service class that was automatically created for you.<\/p>\n<div id=\"attachment_1525\" style=\"width: 297px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/NewCustomerOrderServiceClass.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1525\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/NewCustomerOrderServiceClass.png\" alt=\"New Customer Order Service Class\" width=\"287\" height=\"148\" class=\"size-full wp-image-1525\" \/><\/a><p id=\"caption-attachment-1525\" class=\"wp-caption-text\">New Customer Order Service Class<\/p><\/div>\n<p>There are a couple of requirements for all external content types.  These stipulate that there must be a method for retrieving a single item and another for retrieving a collection of items.  We&#8217;ll start with the multiple items method.  In the <em>BDC Method Details<\/em> pane, expand the <em>Add a Method<\/em> drop down and select <em>Create Finder Method<\/em><\/p>\n<div id=\"attachment_1526\" style=\"width: 444px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/CreateFinderMethod.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1526\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/CreateFinderMethod.png\" alt=\"Create Finder Method\" width=\"434\" height=\"345\" class=\"size-full wp-image-1526\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/CreateFinderMethod.png 434w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/CreateFinderMethod-300x238.png 300w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><\/a><p id=\"caption-attachment-1526\" class=\"wp-caption-text\">Create Finder Method<\/p><\/div>\n<p>This will add a method called <em>ReadList<\/em> to the CustomerOrders entity.<\/p>\n<p>All entities require at least on identifier, so to create one right click on the entity in the diagram and select <em>Add new Identifier<\/em>.<\/p>\n<div id=\"attachment_1527\" style=\"width: 363px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewIdentifier.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1527\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewIdentifier.png\" alt=\"Add New Identifier\" width=\"353\" height=\"197\" class=\"size-full wp-image-1527\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewIdentifier.png 353w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewIdentifier-300x167.png 300w\" sizes=\"auto, (max-width: 353px) 100vw, 353px\" \/><\/a><p id=\"caption-attachment-1527\" class=\"wp-caption-text\">Add New Identifier<\/p><\/div>\n<p>In this example, the identifier is called <em>OrderId<\/em>.<\/p>\n<p>To update this, select the new identifier in the entity and change the name and type to <em>OrderId<\/em> and <em>System.Int32<\/em>, which corresponds to the primary key field in the database.<\/p>\n<div id=\"attachment_1528\" style=\"width: 602px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/RenameIdentifierAndSetType.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1528\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/RenameIdentifierAndSetType.png\" alt=\"Rename Identifier and Set Type\" width=\"592\" height=\"280\" class=\"size-full wp-image-1528\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/RenameIdentifierAndSetType.png 592w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/RenameIdentifierAndSetType-300x141.png 300w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/a><p id=\"caption-attachment-1528\" class=\"wp-caption-text\">Rename Identifier and Set Type<\/p><\/div>\n<p>While adding the new entity to the model, a service class was automatically created for you.  We also require a class to define the fields we want used by the external content type.  Add a new class to the project called <em>CustomerOrderEntity<\/em>.<\/p>\n<div id=\"attachment_1529\" style=\"width: 316px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddCustomerOrderEntityClass.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1529\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddCustomerOrderEntityClass.png\" alt=\"Add Customer Order Entity Class\" width=\"306\" height=\"345\" class=\"size-full wp-image-1529\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddCustomerOrderEntityClass.png 306w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddCustomerOrderEntityClass-266x300.png 266w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/a><p id=\"caption-attachment-1529\" class=\"wp-caption-text\">Add Customer Order Entity Class<\/p><\/div>\n<p>Update the class with the following code:<\/p>\n<pre lang=\"csharp\">\r\npublic partial class CustomerOrderEntity\r\n{\r\n    public int OrderId { get; set; }\r\n\r\n    public int CustomerId { get; set; }\r\n\r\n    public string Title { get; set; }\r\n\r\n    public string Forename { get; set; }\r\n\r\n    public string Surname { get; set; }\r\n\r\n    public string Town { get; set; }\r\n\r\n    public string ItemTitle { get; set; }\r\n\r\n    public decimal Cost { get; set; }\r\n}\r\n<\/pre>\n<p>These map directly to the database view columns that will drive the content.<\/p>\n<p>Back in the model, open the <em>BDC Explorer<\/em> pane and navigate down to the <em>CustomerOrders<\/em> node within <em>ReadList<\/em>.<\/p>\n<p>From there, right click it and add a new type descriptor.<\/p>\n<div id=\"attachment_1531\" style=\"width: 309px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddTypeDescriptor.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1531\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddTypeDescriptor.png\" alt=\"Add Type Descriptor\" width=\"299\" height=\"384\" class=\"size-full wp-image-1531\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddTypeDescriptor.png 299w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddTypeDescriptor-233x300.png 233w\" sizes=\"auto, (max-width: 299px) 100vw, 299px\" \/><\/a><p id=\"caption-attachment-1531\" class=\"wp-caption-text\">Add Type Descriptor<\/p><\/div>\n<p>The new type descriptor is going to map to the first property in the customer order entity class that you just created.<\/p>\n<p>To do this, select the new type descriptor in the BDC Explorer pane and in the Properties pane update it so the <em>Name<\/em> is <em>OrderId<\/em> and the <em>Type Name<\/em> is <em>System.Int32<\/em>.<\/p>\n<div id=\"attachment_1532\" style=\"width: 418px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/OrderIdTypeDescriptor.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1532\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/OrderIdTypeDescriptor.png\" alt=\"OrderId Type Descriptor\" width=\"408\" height=\"716\" class=\"size-full wp-image-1532\" \/><\/a><p id=\"caption-attachment-1532\" class=\"wp-caption-text\">OrderId Type Descriptor<\/p><\/div>\n<p>Repeat this process for the remaining properties.<\/p>\n<div id=\"attachment_1533\" style=\"width: 317px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AllTypeDescriptors.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1533\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AllTypeDescriptors.png\" alt=\"All Type Descriptors\" width=\"307\" height=\"334\" class=\"size-full wp-image-1533\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AllTypeDescriptors.png 307w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AllTypeDescriptors-275x300.png 275w\" sizes=\"auto, (max-width: 307px) 100vw, 307px\" \/><\/a><p id=\"caption-attachment-1533\" class=\"wp-caption-text\">All Type Descriptors<\/p><\/div>\n<p>With the type descriptors in place, we need to let the model know which one maps to the identifier the was added to the entity.  To do this, select <em>OrderId<\/em> in the BDC Explorer pane and in the Properties pane for it set the <em>Identifier Entity<\/em> to <em>CustomerOrders<\/em>.<\/p>\n<div id=\"attachment_1539\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetOrderByIdIdentifierEntity.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1539\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetOrderByIdIdentifierEntity.png\" alt=\"Set OrderId Identifier Entity\" width=\"400\" height=\"622\" class=\"size-full wp-image-1539\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetOrderByIdIdentifierEntity.png 400w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetOrderByIdIdentifierEntity-192x300.png 192w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-1539\" class=\"wp-caption-text\">Set OrderId Identifier Entity<\/p><\/div>\n<p>Next, set the <em>Identifier<\/em> property to <em>OrderId<\/em>.<\/p>\n<div id=\"attachment_1540\" style=\"width: 412px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetOrderIdIdentifier.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1540\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetOrderIdIdentifier.png\" alt=\"Set OrderId Identifier\" width=\"402\" height=\"516\" class=\"size-full wp-image-1540\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetOrderIdIdentifier.png 402w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetOrderIdIdentifier-233x300.png 233w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/a><p id=\"caption-attachment-1540\" class=\"wp-caption-text\">Set OrderId Identifier<\/p><\/div>\n<p>To complete the <em>ReadList<\/em> configuration, select the <em>CustomerOrders<\/em> node.  In the Properties pane, open the drop down for the <em>Type Name<\/em> property, change to the current project tab and select the item titled <em>CustomerOrderEntity<\/em>.  This is the class you added previously and tells the model what type of object to expect this node to process.<\/p>\n<p>With the first finder method almost complete, we&#8217;ll now add the specific finder method to allow single items to be retrieved.<\/p>\n<p>As before, expand the <em>Add a Method<\/em> drop down in the BDC Method Details pane, this time selecting <em>Create Specific Finder Method<\/em>.<\/p>\n<div id=\"attachment_1534\" style=\"width: 419px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/CreateFinderMethod1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1534\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/CreateFinderMethod1.png\" alt=\"Create Finder Method\" width=\"409\" height=\"566\" class=\"size-full wp-image-1534\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/CreateFinderMethod1.png 409w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/CreateFinderMethod1-216x300.png 216w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><\/a><p id=\"caption-attachment-1534\" class=\"wp-caption-text\">Create Finder Method<\/p><\/div>\n<p>After doing this, all the type descriptors you manually created for the ReadList method will be automatically add to the new finder method for you.<\/p>\n<div id=\"attachment_1536\" style=\"width: 305px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AllTypeDescriptors_BothMethods1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1536\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AllTypeDescriptors_BothMethods1.png\" alt=\"All Type Descriptors\" width=\"295\" height=\"510\" class=\"size-full wp-image-1536\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AllTypeDescriptors_BothMethods1.png 295w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AllTypeDescriptors_BothMethods1-173x300.png 173w\" sizes=\"auto, (max-width: 295px) 100vw, 295px\" \/><\/a><p id=\"caption-attachment-1536\" class=\"wp-caption-text\">All Type Descriptors<\/p><\/div>\n<p>Now onto the parameters for the two new methods that you just created.<\/p>\n<p>Starting with <em>ReadList<\/em>, highlight the row in the BDC Method Details pane where the direction type is return, clicking on the <em>Type Descriptor<\/em> column.<\/p>\n<p>The type name for this is currently set incorrectly and needs to map to the customer order entity class that was manually added to the project.<\/p>\n<p>To do this, open the drop down list for <em>Type Name<\/em> in the properties pane, select the tab for the current project and select the <em>CustomerOrderEntity<\/em> item.<\/p>\n<div id=\"attachment_1537\" style=\"width: 1638px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadListReturnParameter.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1537\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadListReturnParameter.png\" alt=\"Set Type Name for ReadList Return Parameter\" width=\"1628\" height=\"525\" class=\"size-full wp-image-1537\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadListReturnParameter.png 1628w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadListReturnParameter-300x96.png 300w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadListReturnParameter-1024x330.png 1024w\" sizes=\"auto, (max-width: 1628px) 100vw, 1628px\" \/><\/a><p id=\"caption-attachment-1537\" class=\"wp-caption-text\">Set Type Name for ReadList Return Parameter<\/p><\/div>\n<p>Do the exact same for the <em>ReadItem<\/em> method.<\/p>\n<div id=\"attachment_1538\" style=\"width: 1633px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadItemReturnParameter.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1538\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadItemReturnParameter.png\" alt=\"Set Type Name for ReadItem Return Parameter\" width=\"1623\" height=\"526\" class=\"size-full wp-image-1538\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadItemReturnParameter.png 1623w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadItemReturnParameter-300x97.png 300w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/SetTypeNameForReadItemReturnParameter-1024x331.png 1024w\" sizes=\"auto, (max-width: 1623px) 100vw, 1623px\" \/><\/a><p id=\"caption-attachment-1538\" class=\"wp-caption-text\">Set Type Name for ReadItem Return Parameter<\/p><\/div>\n<p>That should be the model complete, at least as far as this demonstration is concerned.  You&#8217;ll be able to follow similar steps to add filters that allow you to limit the number of items returned, for example.<\/p>\n<p>If you take a look at the CustomerOrderService class you&#8217;ll see a couple of methods have already been added, each one mapping to the finder method that you added via the model diagram.<\/p>\n<pre lang=\"csharp\">\r\npublic static IEnumerable<string> ReadList()\r\n{\r\n    throw new System.NotImplementedException();\r\n}\r\n        \r\npublic static string ReadItem(int orderId)\r\n{\r\n    throw new System.NotImplementedException();\r\n}\r\n<\/pre>\n<p>As mentioned at the start of this post, the purpose of this is to provide a walk through on creating a simple external content type, so I won&#8217;t go into the implementation of these methods in detail, although, if you&#8217;re interested in seeing this up and running I have provided the full source code for the sample.  You&#8217;ll find a link for this at the end of this post.<\/p>\n<p>The code that should replace the above is:<\/p>\n<pre lang=\"csharp\">\r\npublic static IEnumerable<CustomerOrderEntity> ReadList()\r\n{\r\n    IEnumerable<CustomerOrderEntity> orderEntities;\r\n\r\n    using (var dbEntities = new DemoDbModelDataContext(GetConnectionString()))\r\n    {\r\n        IList<vCustomerOrder> orderRecords = (from customerOrder in dbEntities.vCustomerOrders\r\n                                                select customerOrder).ToList();\r\n\r\n        orderEntities = from record in orderRecords\r\n                        select ConvertToCustomerOrderEntity(record);\r\n    }\r\n\r\n    return orderEntities;\r\n}\r\n\r\npublic static CustomerOrderEntity ReadItem(int orderId)\r\n{\r\n    using (var dbEntities = new DemoDbModelDataContext(GetConnectionString()))\r\n    {\r\n        vCustomerOrder customerOrderRecord = GetCustomerOrderByOrderId(dbEntities, orderId);\r\n\r\n        CustomerOrderEntity orderEntity = ConvertToCustomerOrderEntity(customerOrderRecord);\r\n\r\n        return orderEntity;\r\n    }\r\n}\r\n\r\nprivate static readonly Func<DemoDbModelDataContext, int, vCustomerOrder> GetCustomerOrderByOrderId = CompiledQuery.Compile(\r\n    (DemoDbModelDataContext context, int orderId) =>\r\n        context.vCustomerOrders.FirstOrDefault(d => d.OrderId == orderId)\r\n    );\r\n\r\nprivate static string GetConnectionString()\r\n{\r\n    var builder = new SqlConnectionStringBuilder\r\n    {\r\n        DataSource = \".\",\r\n        InitialCatalog = \"BDC_DemoDb\",\r\n        IntegratedSecurity = true\r\n    };\r\n\r\n    return builder.ConnectionString;\r\n}\r\n\r\nprivate static CustomerOrderEntity ConvertToCustomerOrderEntity(vCustomerOrder taskCtView)\r\n{\r\n    var customerOrderEntity = new CustomerOrderEntity\r\n    {\r\n        OrderId = taskCtView.OrderId,\r\n        CustomerId = taskCtView.CustomerId,\r\n        Title = taskCtView.Title,\r\n        Forename = taskCtView.Forename,\r\n        Surname = taskCtView.Surname,\r\n        Town = taskCtView.Town,\r\n        ItemTitle = taskCtView.ItemTitle,\r\n        Cost = taskCtView.Cost                \r\n    };\r\n\r\n    return customerOrderEntity;\r\n}\r\n<\/pre>\n<p>Which you can see uses the LINQ to SQL data model to access the SQL data and transforms the result to the types the BDC model expects.<\/p>\n<p><strong>Deploying<\/strong><\/p>\n<p>Once all the SQL code has been wired up, go ahead and deploy the solution.<\/p>\n<p>Once deployed, the farm scoped feature will automatically activate and create the external content type in Central Administration for the BDC service that is defined for the current web application.<\/p>\n<div id=\"attachment_1541\" style=\"width: 1614px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeployedECT.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1541\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeployedECT.png\" alt=\"Deployed ECT\" width=\"1604\" height=\"408\" class=\"size-full wp-image-1541\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeployedECT.png 1604w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeployedECT-300x76.png 300w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/DeployedECT-1024x260.png 1024w\" sizes=\"auto, (max-width: 1604px) 100vw, 1604px\" \/><\/a><p id=\"caption-attachment-1541\" class=\"wp-caption-text\">Deployed ECT<\/p><\/div>\n<p>Drilling into the content type you can see the fields that are available.<\/p>\n<div id=\"attachment_1542\" style=\"width: 1055px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECT_ItemDefinition.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1542\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECT_ItemDefinition.png\" alt=\"ECT Item Definition\" width=\"1045\" height=\"657\" class=\"size-full wp-image-1542\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECT_ItemDefinition.png 1045w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECT_ItemDefinition-300x188.png 300w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECT_ItemDefinition-1024x643.png 1024w\" sizes=\"auto, (max-width: 1045px) 100vw, 1045px\" \/><\/a><p id=\"caption-attachment-1542\" class=\"wp-caption-text\">ECT Item Definition<\/p><\/div>\n<p>In a site collection for the same web application, create a new external list and associate the external content type with it.  Viewing the list should present you something like the following:<\/p>\n<div id=\"attachment_1543\" style=\"width: 1451px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewResults.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1543\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewResults.png\" alt=\"ECT View Results\" width=\"1441\" height=\"105\" class=\"size-full wp-image-1543\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewResults.png 1441w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewResults-300x21.png 300w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewResults-1024x74.png 1024w\" sizes=\"auto, (max-width: 1441px) 100vw, 1441px\" \/><\/a><p id=\"caption-attachment-1543\" class=\"wp-caption-text\">ECT View Results<\/p><\/div>\n<p>For a single item:<\/p>\n<div id=\"attachment_1544\" style=\"width: 633px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewItem.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1544\" src=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewItem.png\" alt=\"ECT View Item\" width=\"623\" height=\"479\" class=\"size-full wp-image-1544\" srcset=\"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewItem.png 623w, http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/ECTViewItem-300x230.png 300w\" sizes=\"auto, (max-width: 623px) 100vw, 623px\" \/><\/a><p id=\"caption-attachment-1544\" class=\"wp-caption-text\">ECT View Item<\/p><\/div>\n<p><strong>Code<\/strong><br \/>\nTo download the code and database schema for this walk through, click on the following <a href=\"\/downloads\/BDCDemo.zip\">link<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[3],"tags":[22,81],"class_list":["post-1504","post","type-post","status-publish","format-standard","hentry","category-sharepoint","tag-content-types","tag-sharepoint"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"A walkthrough guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Stu\"\/>\n\t<meta name=\"keywords\" content=\"sharepoint,sps,sp,ect,external content type\" \/>\n\t<link rel=\"canonical\" href=\"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_GB\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Stuart Roberts on all things SharePoint |\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint\" \/>\n\t\t<meta property=\"og:description\" content=\"A walkthrough guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#\" \/>\n\t\t<meta property=\"og:url\" content=\"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2013-08-09T15:21:47+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-08-09T15:21:47+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@SharePointStu\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint\" \/>\n\t\t<meta name=\"twitter:description\" content=\"A walkthrough guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@SharePointStu\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#article\",\"name\":\"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint\",\"headline\":\"External Content Type Walkthrough\",\"author\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/www.stuartroberts.net\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/AddNewBDCModel.png\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#articleImage\",\"width\":955,\"height\":660,\"caption\":\"Add new BDC Model\"},\"datePublished\":\"2013-08-09T16:21:47+01:00\",\"dateModified\":\"2013-08-09T16:21:47+01:00\",\"inLanguage\":\"en-GB\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#webpage\"},\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#webpage\"},\"articleSection\":\"SharePoint, Content Types, SharePoint\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/www.stuartroberts.net\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/category\\\/sharepoint\\\/#listItem\",\"name\":\"SharePoint\"}},{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/category\\\/sharepoint\\\/#listItem\",\"position\":2,\"name\":\"SharePoint\",\"item\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/category\\\/sharepoint\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#listItem\",\"name\":\"External Content Type Walkthrough\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#listItem\",\"position\":3,\"name\":\"External Content Type Walkthrough\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/category\\\/sharepoint\\\/#listItem\",\"name\":\"SharePoint\"}}]},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/#person\",\"name\":\"Stu\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/503cb376bab10c66a6bde71d1514dcab2eab4ec44a2f82ef597ca87af61bf1cd?s=96&d=retro&r=g\",\"width\":96,\"height\":96,\"caption\":\"Stu\"}},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/author\\\/admin\\\/#author\",\"url\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/author\\\/admin\\\/\",\"name\":\"Stu\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/503cb376bab10c66a6bde71d1514dcab2eab4ec44a2f82ef597ca87af61bf1cd?s=96&d=retro&r=g\",\"width\":96,\"height\":96,\"caption\":\"Stu\"}},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#webpage\",\"url\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/\",\"name\":\"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint\",\"description\":\"A walkthrough guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#\",\"inLanguage\":\"en-GB\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/#website\"},\"breadcrumb\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/2013\\\/08\\\/09\\\/external-content-type-walkthrough\\\/#breadcrumblist\"},\"author\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/index.php\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2013-08-09T16:21:47+01:00\",\"dateModified\":\"2013-08-09T16:21:47+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/#website\",\"url\":\"http:\\\/\\\/www.stuartroberts.net\\\/\",\"name\":\"Stuart Roberts on all things SharePoint\",\"inLanguage\":\"en-GB\",\"publisher\":{\"@id\":\"http:\\\/\\\/www.stuartroberts.net\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint","description":"A walkthrough guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#","canonical_url":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/","robots":"max-image-preview:large","keywords":"sharepoint,sps,sp,ect,external content type","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#article","name":"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint","headline":"External Content Type Walkthrough","author":{"@id":"http:\/\/www.stuartroberts.net\/index.php\/author\/admin\/#author"},"publisher":{"@id":"http:\/\/www.stuartroberts.net\/#person"},"image":{"@type":"ImageObject","url":"http:\/\/www.stuartroberts.net\/wp-content\/uploads\/2013\/08\/AddNewBDCModel.png","@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#articleImage","width":955,"height":660,"caption":"Add new BDC Model"},"datePublished":"2013-08-09T16:21:47+01:00","dateModified":"2013-08-09T16:21:47+01:00","inLanguage":"en-GB","mainEntityOfPage":{"@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#webpage"},"isPartOf":{"@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#webpage"},"articleSection":"SharePoint, Content Types, SharePoint"},{"@type":"BreadcrumbList","@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"http:\/\/www.stuartroberts.net\/#listItem","position":1,"name":"Home","item":"http:\/\/www.stuartroberts.net\/","nextItem":{"@type":"ListItem","@id":"http:\/\/www.stuartroberts.net\/index.php\/category\/sharepoint\/#listItem","name":"SharePoint"}},{"@type":"ListItem","@id":"http:\/\/www.stuartroberts.net\/index.php\/category\/sharepoint\/#listItem","position":2,"name":"SharePoint","item":"http:\/\/www.stuartroberts.net\/index.php\/category\/sharepoint\/","nextItem":{"@type":"ListItem","@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#listItem","name":"External Content Type Walkthrough"},"previousItem":{"@type":"ListItem","@id":"http:\/\/www.stuartroberts.net\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#listItem","position":3,"name":"External Content Type Walkthrough","previousItem":{"@type":"ListItem","@id":"http:\/\/www.stuartroberts.net\/index.php\/category\/sharepoint\/#listItem","name":"SharePoint"}}]},{"@type":"Person","@id":"http:\/\/www.stuartroberts.net\/#person","name":"Stu","image":{"@type":"ImageObject","@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/503cb376bab10c66a6bde71d1514dcab2eab4ec44a2f82ef597ca87af61bf1cd?s=96&d=retro&r=g","width":96,"height":96,"caption":"Stu"}},{"@type":"Person","@id":"http:\/\/www.stuartroberts.net\/index.php\/author\/admin\/#author","url":"http:\/\/www.stuartroberts.net\/index.php\/author\/admin\/","name":"Stu","image":{"@type":"ImageObject","@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/503cb376bab10c66a6bde71d1514dcab2eab4ec44a2f82ef597ca87af61bf1cd?s=96&d=retro&r=g","width":96,"height":96,"caption":"Stu"}},{"@type":"WebPage","@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#webpage","url":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/","name":"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint","description":"A walkthrough guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#","inLanguage":"en-GB","isPartOf":{"@id":"http:\/\/www.stuartroberts.net\/#website"},"breadcrumb":{"@id":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/#breadcrumblist"},"author":{"@id":"http:\/\/www.stuartroberts.net\/index.php\/author\/admin\/#author"},"creator":{"@id":"http:\/\/www.stuartroberts.net\/index.php\/author\/admin\/#author"},"datePublished":"2013-08-09T16:21:47+01:00","dateModified":"2013-08-09T16:21:47+01:00"},{"@type":"WebSite","@id":"http:\/\/www.stuartroberts.net\/#website","url":"http:\/\/www.stuartroberts.net\/","name":"Stuart Roberts on all things SharePoint","inLanguage":"en-GB","publisher":{"@id":"http:\/\/www.stuartroberts.net\/#person"}}]},"og:locale":"en_GB","og:site_name":"Stuart Roberts on all things SharePoint |","og:type":"article","og:title":"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint","og:description":"A walkthrough guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#","og:url":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/","article:published_time":"2013-08-09T15:21:47+00:00","article:modified_time":"2013-08-09T15:21:47+00:00","twitter:card":"summary","twitter:site":"@SharePointStu","twitter:title":"Creating an External Content Type Walkthrough | Stuart Roberts on all things SharePoint","twitter:description":"A walkthrough guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#","twitter:creator":"@SharePointStu"},"aioseo_meta_data":{"post_id":"1504","title":"Creating an External Content Type Walkthrough | #site_title","description":"A walkthrough  guide on how to create an external content type for SharePoint 2010 in Visual Studio with C#","keywords":[{"label":"SharePoint","value":"SharePoint"},{"label":"SPS","value":"SPS"},{"label":"SP","value":"SP"},{"label":"ECT","value":"ECT"},{"label":"external content type","value":"external content type"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-08-03 13:47:03","updated":"2026-10-15 19:21:46","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"http:\/\/www.stuartroberts.net\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"http:\/\/www.stuartroberts.net\/index.php\/category\/sharepoint\/\" title=\"SharePoint\">SharePoint<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tExternal Content Type Walkthrough\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"http:\/\/www.stuartroberts.net\/"},{"label":"SharePoint","link":"http:\/\/www.stuartroberts.net\/index.php\/category\/sharepoint\/"},{"label":"External Content Type Walkthrough","link":"http:\/\/www.stuartroberts.net\/index.php\/2013\/08\/09\/external-content-type-walkthrough\/"}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/1504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/comments?post=1504"}],"version-history":[{"count":15,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/1504\/revisions"}],"predecessor-version":[{"id":1549,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/1504\/revisions\/1549"}],"wp:attachment":[{"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/media?parent=1504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/categories?post=1504"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/tags?post=1504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}