C
C#3mo ago
xandyMelo

✅ could not be translated

Generally what solution do you use when you get the "could not be translated" error from ef core? I generally try to use a [NotMapped] property(it doesn't always work), but I saw that it is possible to create a procedure to translate a specific command
4 Replies
MODiX
MODiX3mo ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code! (see $code for more information on how to paste your code)
Angius
Angius3mo ago
The solution is to rewrite the query in a way that can be translated [NotMapped] is there if you don't want some property to be stored in the database Don't just throw random shit at the problem and hope for a solution
becquerel
becquerel3mo ago
either you rewrite the query or you accept doing at least part of the evaluation client-side by putting a .tolistasync somewhere in the middle
FusedQyou
FusedQyou3mo ago
As per the bot, please just post your code if you face an issue like this so that a proper answer can be given There's really no context here that can help
Want results from more Discord servers?
Add your server