-
I am sorry if this is the wrong forum, please redirect me to the correct place, if that is the case. With AutoMapper.AspNetCore.OData.EFCore 3.0.1, everything works(tm). When upgrading to v3.0.2 or later I get the exception below, whenever I add any OData query to my OData resource (e.g. a simple "/?$top=1")
There are no other changes on my side except for the v3.0.1 -> v3.0.2 version upgrade. I have tried AutoMapper.AspNetCore.OData.EFCore v3.0.5 with the same result. I use .NET6, and I have the latest versions of everything else. The OData resource is defined like this:
that static method is defined like this: I would really appreciate some help. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
The error is being thrown here it could be a bug. The change was added in PR 123. Since our tests and samples all work I would compare your configuration to the samples and recommend a fix if some valid configuration is not being supported. |
Beta Was this translation helpful? Give feedback.
-
The title of PR 123 (Adds support for $skip and $top with no order specified) that you kindly pointed me to, led me to try adding an "orderby" to my "top" query. Then the query works even in v3.0.5 without the exception! Perhaps my configuration somehow provokes it. It seems PR 123 assumes something that my code or configuration does not live up to. I can't see anything obvious but I will keep on looking. |
Beta Was this translation helpful? Give feedback.
-
I'll convert this to an issue. Looks like you have a custom namespace which means here it can't find an Similar to issue #149. |
Beta Was this translation helpful? Give feedback.
-
Adding |
Beta Was this translation helpful? Give feedback.
-
You are completely correct. Confirming that
provokes the error when doing "top" without "orderby" in v3.0.2 and later versions. However:
works in 3.0.2 and later. I am happy! Thank you @BlaiseD |
Beta Was this translation helpful? Give feedback.
I'll convert this to an issue.
Looks like you have a custom namespace which means here it can't find an
IEDMEnityType
from the type full name.Similar to issue #149.