The last part showed how to host an ADO.NET Data Services and how to create a proxy to consume it. This part describes how to replace the Entity Framework part with custom Data Sources (for example POCO business objects).
By doing this, you will get the full functionality of ADO.NET Data Services but the flexibility to use you own custom Data Sources (Object in Memory, Oracle DB, Data Cubes, Files, etc…).
- Open the ADO.NET Data Service project and add some new classes that will serve as structure for your custom Data Source (for example Invoice, InvoiceLine, Thirdparty and BusinessEntities)
- The BusinessEntities class serves as container for the different custom entities that you want to expose, they are initialized in the constructor for the example and must be accessible via public IQueryable properties
- Add a new item of type ADO.NET Data Service
- Change the Data Service code of the new ExampleDataService2 and add as type the custom BusinessEntities
No comments:
Post a Comment