Hybrid BCS – Part 2 – Create an OData Source


The BCS hybrid scenario supports connecting only to an Open Data protocol (Odata) source. If your external data already has an OData service endpoint, then you can skip the creation of an OData service endpoint portions of this procedure.

Using Visual Studio 2013, create an empty ASP.NET web application calling it NorthwindWeb, and follow these steps:

Add an ADO.NET Entity Data Model


  1. Right click on the project and choose Add >> New Item
  2. Select Data under Visual C#
  3. Select ADO.NET Entity Data Model
  4. Call it NorthwindModel.edmx
  5. Click Add
  6. Select Generate from database in the Entity Data Model Wizard
  7. Click Next
  8. Choose New Connection if you do not have an existing connection, or connect to an existing one
  9. Click Next
  10. Select Entity Framework 5.0
  11. Select all the tables
  12. Click Finish
  13. Compile the project.

Add a WCF Data Service

  1. Right click on the project and choose Add >> New Item
  2. From the Web node choose the WCF Data Service 5.6 item
  3. In the Name text box, enter Northwind
  4. Click on Add
  5. Edit the code for Northwind to update the following: 




    1. public class NorthwindCustomers : DataService <NorthwindEntities>
    2. Replace the comments in the InitializeService event handler with the following: config.SetEntitySetAccessRule(“*”, EntitySetRights.All);
  6. Compile the project.

This should be for creating an OData Source.

<< Prevoius – Part 1 – Introduction to Hybrid BCS Architecture

>> Next – Part 3 – External Content Type Configuration

  • Monday, June 08, 2015 By : Mike Maadarani    0 comment