DS
Size: a a a
DS
NK
DS
NK
ΑZ
inactiveOnly
)SELECT p."Id", array_agg(s."Id")
FROM dbo."Persons" p
LEFT JOIN dbo."Schedule" s on p."Id" = s."EntityId"
where p."NicName" ILIKE '%test%' AND (.. more conditions)
GROUP BY p."Id"
HAVING WHEN @inactiveOnly THEN COUNT(s."Id") = 0 ELSE 1 = 1 END
ORDER BY p."Id"
LIMIT 20 OFFSET 0
Покажи
как это на LINQ будет выглядетьDS
NK
DS
DS
NK
inactiveOnly
)SELECT p."Id", array_agg(s."Id")
FROM dbo."Persons" p
LEFT JOIN dbo."Schedule" s on p."Id" = s."EntityId"
where p."NicName" ILIKE '%test%' AND (.. more conditions)
GROUP BY p."Id"
HAVING WHEN @inactiveOnly THEN COUNT(s."Id") = 0 ELSE 1 = 1 END
ORDER BY p."Id"
LIMIT 20 OFFSET 0
Покажи
как это на LINQ будет выглядетьΑZ
NK
NK
ΑZ
ΑZ
DS
ΑZ
System.InvalidOperationException: The LINQ expression 'DbSet<Person>()
.LeftJoin(
inner: DbSet<Schedule<Person>>()
.Where(s => s.DeletedOn == null),
outerKeySelector: p => p.Id,
innerKeySelector: s => s.EntityId,
resultSelector: (p, s) => new TransparentIdentifier<Person, Schedule<Person>>(
Outer = p,
Inner = s
))
.GroupBy(
keySelector: ti => ti.Outer,
elementSelector: ti => ti.Inner)' 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 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
ΑZ
DS