-
Notifications
You must be signed in to change notification settings - Fork 180
Description
With minimal APIs, I cannot figure out how to have $expand work properly when the $expand is one a single entity and not a collection.
If I use .FirstOrDefault(...) then I get expected results and a valid entity - $select even works.
However, if I try to use SingleResult<T> with .Where(...) for $expand then I start to get errors related to conversions or the wrapped type not being present in the model
The given model does not contain the type 'Microsoft.AspNetCore.OData.Results.SingleResult
1[[Turpy.Nexus.Data.Entities.Organization, Turpy.Nexus.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. (Parameter 'elementClrType')
Can someone give me an example of how to accomplish this or check if this is a bug? I can have it return a collection of 1 item but that is not very clean or performant.