Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have multiple entity sets for the same OData controller in ASP.NET MVC 5

I was following this sample to create Odata end-point

In this it says:

Note that an endpoint can have multiple entity sets. Call EntitySet for each entity set, and then define a corresponding controller.

Now, I cant have a controller for every single entity set and I want to give OData support.

If I want to have multiple entity sets in a single controller how do I go about doing it?

Regards.

like image 956
Codehelp Avatar asked Nov 11 '22 07:11

Codehelp


1 Answers

This might be a decent sample to give you some ideas. It creates Dynamic OData Routes

https://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/OData/v4/DynamicEdmModelCreation/

like image 176
Tony Avatar answered Jan 04 '23 03:01

Tony