Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

can a non-OData controller coexist in a project with OData controllers?

$
0
0

I've got an OData v4 project that I'm able to do most of what I want to do.  However, there are some custom queries that I need to provide, which I have not been able to successfully do within the OData way of doing things.  Time is running out and I just need to get these additional features done.

Is there a way to create a non-OData controller, put it inside this project, and then be able to use it?

How do I set up the routing so that this can happen?

For instance, I have a table called Disclosure.  The Disclosure controller works.  I can query the Disclosure, as well as related tables just fine.  However, in some cases, the user might want to see a PDF associated with a particular disclosure.  So I want a custom method called PDF() that I can pass the disclosure key, and the server will then go find the PDF, read it, and send the contents of it back to the caller.  I've done this before in non-OData projects, but I never was able to figure out how to do it the OData-way and I'm running out of time, so I just need to get this custom controller set up that will allow this non-OData type of call.


Viewing all articles
Browse latest Browse all 4850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>