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
--info: Microsoft.EntityFrameworkCore.Database.Command[20101]--Executed DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30']SELECTt1.c, t1.c0FROM"Things"AS t
LEFT JOIN (
SELECTt0.c, t0.c0, t0."Guid", t0."ThingId"FROM (
SELECT CAST(p."Value"ASdouble precision) AS c, 1AS c0, p."Guid", p."ThingId", ROW_NUMBER() OVER(PARTITION BY p."ThingId"ORDER BY CAST(p."Value"ASdouble precision) DESC) AS row
FROM"Properties"AS p
WHERE p."Identifier"='Price'
) AS t0
WHEREt0.row<=1
) AS t1 ON t."Guid"= t1."ThingId"
//The LINQ expression 'DbSet<Thing>.OrderBy(t =>DbSet<Property>.Where(p =>p.Identifier=="Price").OrderByDescending(p =>Convert.ToDouble(p.Value)).Where(p =>p.ThingId==t.Guid).Select(p =>(Convert.ToDouble(p.Value)asNullable<double>)).FirstOrDefault())//' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
//The LINQ expression 'DbSet<Thing>.Where(t =>DbSet<Property>.Where(p =>p.Identifier=="Price").OrderByDescending(p =>Convert.ToDouble(p.Value)).Where(p =>p.ThingId==t.Guid).Select(p =>(Convert.ToDouble(p.Value)asNullable<double>)).FirstOrDefault()>(Nullable<double>)0)//' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
I don't understand why it is not working if the value is correctly calculated on the database side.
The text was updated successfully, but these errors were encountered:
Hi,
With the following tables:
The following sample:
I'm getting this output:
I don't understand why it is not working if the value is correctly calculated on the database side.
The text was updated successfully, but these errors were encountered: