In this section, we will discuss how we can create an OData Service and consume it from an ASP.NET MVC application. To get started using OData in .NET applications, you need to first create a WCF Data Service. You can create and use an Entity Data Model using the ADO.NET Entity Framework template in Visual Studio.
Here are the steps to create an OData Service:
To create a WCF Data Service, click on Project | Add New Item and then select WCF Data Service from the list of the templates displayed. Note that you will need to add these references to your project:
System
System.Core
System.ServiceModel
System.ServiceModel.Web
System.Data.Services...