I was working with the following stack MVC5 + WebAPI 2.2 + EF6 + AngularJS for my web application. Today, I tried to incorporate OData
and Angular BreezeJS
into my application and it worked fine for one of the entities.
Currently, I have around 45 tables which translate to 45 model classes.
In Web API, I could have just have 5-10 controllers to handle the CRUD operations for the 45 models using a switch statement based on the variables I pass like entityName
, operationName
.
But, in OData I need 45 controllers scaffold-ed by VS. Is there any way I can use the benefits of OData such as querying/paging/patching
without having to create a controller for each model class ?