{"repo":"DevExpress-Examples/XPO_how-to-implement-odata4-service-with-xpo","free":true,"listed":false,"github":"https://github.com/DevExpress-Examples/XPO_how-to-implement-odata4-service-with-xpo","clone":"git clone https://github.com/DevExpress-Examples/XPO_how-to-implement-odata4-service-with-xpo.git","description":"How to Implement OData v4 Service with XPO (.NET Framework)","language":"C#","stars":12,"topics":["xpo","netframework","netframework45","odata","rest-api","restful","orm"],"license":null,"category":"databases-storage","readme_excerpt":"How to Implement OData v4 Service with XPO (.NET Framework) Note : It is much easier to use the Web API Service with integrated authorization & CRUD operations based on ASP.NET Core OData 8.0 (OData v4) powered by EF Core and XPO ORM library instead. For more information, see A 1-Click Solution for CRUD Web API Services with Role-based Access Control via EF Core & XPO (FREE). This example describes how to implement an OData v4 service with XPO and .NET Framework 4.5. This example is an ASP.NET MVC 5 Web API project and provides a simple REST API for data access. For the .NET Core-based example, refer to How to Implement OData v4 Service with XPO (.NET Core). Steps to Implement 1. Create a new ASP.NET Web Application project and select the Web API project template (refer to the Create the Visual Studio Project section in this example for details. 2. Install the following nuget packages: DevExpress.Xpo Microsoft.AspNet.OData 3. Define your data model - implement persistent classes and initialize the data layer. If you are new to XPO, refer to the following articles to learn how to do this: Create Persistent Class, Map to Existing Tables. 4. Add files from the CS\\OdataService\\Helpers folder in this example to your project (Quick Tip: Add files to Visual Studio projects the easy way). 5. Modify the Application Start() method declared in the Global.asax file: register the model body validator class and initialize the Data Access Layer. 6. Modify the WebApiConfig.cs file: create an","default_branch":null,"files":null,"tree":[],"storefront":"/r/DevExpress-Examples","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/DevExpress-Examples/XPO_how-to-implement-odata4-service-with-xpo/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}