You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cts-tradeit
changed the title
Combining using OrderBy on property that was resolved using ternary operator.
Using OrderBy on property that was resolved using double ternary operator.
Apr 25, 2024
@cts-tradeit please take the time to create a minimal, runnable code sample (e.g. a console program) - the above is a very partial snippet without a full exception etc.
Current behaviour
Sample query from DebugView (the query is way bigger but this is the part that causes the problem):
Produces:
System.InvalidOperationException: The LINQ expression 'DbSet()
.OrderByDescending(a => a.WorkerAccountingId != null ? DbSet()
.Where(w => w.AccountingId == a.WorkerAccountingId)
.SingleOrDefault() : a.WorkerEnterpriseId != null ? DbSet()
.Where(w0 => w0.EnterpriseId == a.WorkerEnterpriseId)
.SingleOrDefault() : null.Surname)' could not be translated
The text was updated successfully, but these errors were encountered: