WCF Tutorial
www.Learn2Expert.net A new ASP.Net MVC 4, SSIS, Interview Q/A tutorial - Visit - www.Learn2Expert.net
Skip Navigation LinksHomeParts of ODataOData Data Model No of Views: 29483

OData Data Model

It is abstract data model, used to represent the data from different data source in single format using Entity Data model (EDM). Entity Data Model represents the logical structure of the data and it does not care how physically data are stored.

It is part of developers to decide how data from different data source is mapped to Entity Data Model. In EDM, each row in a table is mapped to Entity and relationship between tables is represented using association. Association can be unidirectional or bidirectional.

Entity represents the simple structure using Property (column information of row in table) which holds the common data type like Int32, Boolean, String etc

Each Entity has a special type of property called "Navigation Property" which is used to represent the association.

Entity Set stores the collection of Entity and collection of Entity Set are belong to Entity Container. Structure of the EDM is mention below.


  • Always create the service with Interface->Implementation format, mention the contract in Interface.
  • Define the service in Class library and refer the class library in Host project. Don’t use service class in host project.
  • Change the instance mode to per call as default.
  • Always catch exception using try/catch block and throw exception using FaultException < T >.
  • Logging and Include exception should be enable while compiling the project in debug mode. While in production deployment disable the logging and Include exception details.