Is it possible to get OData to do the following? I would like to be able to query a REST call by passing on parameters than may not be the primary key. Can I call a REST met
For OData v4.0 endpoints, you don't have to make it a function, you can simply do...
public class ReportsController : ODataController
{
[EnableQuery]
[ODataRoute("Reports({id}, {year})")]
public IQueryable Get([FromODataUri] int id, [FromODataUri] int year)
{
...
}
}
Then you can call it like...
/Reports(42, 2019)