vega
vega copied to clipboard
queryResult not valid object to return in ApiController [On Hold]
In the pattern of filterResource being passed to the controller to return the queryResults, the object that is returned is not valid to be passed on as OkObjectResult
to the ApiController
(for example GetVehicles(VehicleQueryResource filterResource)
in the vehicles controller).
How can the QueryResultResource<T>
be converted to an OkObjectResult
so that we can continue to use this pattern?
Cannot implicitly convert type 'Microsoft.AspNetCore.Mvc.OkObjectResult' to '...QueryResultResource<...VehicleListResource>'