1
I made a WebAPI
(ASPNET
with EF6
) with verb support Get()
, Post()
and Delete()
. At some point, I need to access certain values that are not returned by default by verbs, for example:
The Order Controller has a method Get()
that will return the entire listing and a method Get(int id)
that will bring the request by ID, but if I want a request by the Id of the related establishment I would have to take all the Orders and filter in the application. It would make the requisition too heavy.
I’d like to make a Get()
that receives, for example, a parameter where
and a parameter with the value I expect from Where, for example id_estabelecimento/3
. Is it possible to accomplish such a feat? There is a better way to treat this kind of demand?
Language? Framework?
– novic
Sorry, @Virgilionovic, I added to the question
– Csorgo
and if you do a method for it! just do another method and put the verb get too!
– novic
@Csorgo search in Odata for Entity framework. I’m running out of time to make an example now, but I think you can find good stuff on the internet.
– Jéf Bueno
could be a little clearer ? you a method of your control or an EF get method ? that receives a query ? post your code as you tried to do even if wrong.
– Marco Souza