C
C#2mo 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
MODiX2mo 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
Angius2mo 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
Becquerel2mo 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
FusedQyou2mo 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