From this article you will learn how to remote bind the kendo grid using WEB API 2 ODATA v3 and Entity Framework.
Introduction
What is OData
Description
Now let us start with creating the OData End point with WEB API.
Just create a WEB API project in Visual Studio as in the following figures 1 and 2:
Right-click on the model folder and create a class. In my case I named it Product. Write the following code in the Product.cs model class.
Here I am using Entity Framework Code first technique so we need to create the context class. Right-click on the model folder and create one more class. In my case I named it ProductContext. Write the following code in ProductContext class.
Scaffolding the WEB API Controller Class Note: Before doing Scaffolding build your application once. Right-click on Controller folder, then select Add--> Controller and create a WEB API class as in the following figure 3 and 4.
Before implementing the service in the Kendo UI once check the service request/response in Postman / Fiddler.
Create an HTML page in your project. In my case I named it KendoGrid.html.
Conclusion
From this article we learned about OData and how to remote bind the Kendo grid using WEB API 2 ODATA v3 and Entity Framework
Hope you have enjoyed this article.
Thank you! Happy Coding!
Diving Into ASP.NET WebAPI