Open Type with EF Core and Key/Value table #1051
Replies: 4 comments
-
Any Ideas @xuzhg? |
Beta Was this translation helpful? Give feedback.
-
@BorisWilhelms Thanks for filing this. I will look your repro and share a response with you later. By the way, it seems it's similar with https://github.com/xuzhg/mydotnetconf. Did you get a chance to try my sample first? |
Beta Was this translation helpful? Give feedback.
-
@xuzhg thanks for the example. As far as I understand, the Binders and Serializer might help with the select and filter? Will check that out |
Beta Was this translation helpful? Give feedback.
-
I was doing a PoC of the exact same thing this week. I've ended up with implementing a custom |
Beta Was this translation helpful? Give feedback.
-
Hello,
this is at first a question and then maybe a bug, depending if we do things correct. The full example/repro can be found here: https://github.com/BorisWilhelms/ODataEfCoreOpenType/tree/main
We want to use Open Types to represent custom properties. These custom properties are stored in a key/value table.
In our model we reference the CustomAttribute table and then build the Dictionary dynamically
In the EDM we ignore the
CustomAttributes
property and in the DbContext we ignore theProperties
property.In the Controller we check if a custom attribute is selected and do a manual include of the CustomAttributes table.
Overall this works, but we have some problems/questions:
Id
from personIt looks like, that EfCore is trying to filter on the Dictionary?
So, is this the right way to do that, or is this a not supported scenario?
Best regards
Boris
Beta Was this translation helpful? Give feedback.
All reactions