Open
Description
Example of linq
new MyContext().Cars.Where(x => false).Select(x => x.Owner).Select(x => x.LastName +
(!string.IsNullOrEmpty(x.LastName) && !string.IsNullOrEmpty(x.FirstName)
? " " + x.FirstName
: string.Empty) + ((!string.IsNullOrEmpty(x.LastName) ||
!string.IsNullOrEmpty(x.FirstName)) && !string.IsNullOrEmpty(x.MiddleName)
? " " + x.MiddleName
: string.Empty)
).ToList();
Resulting query
SELECT E'' || CASE WHEN ($1 IS NULL) THEN (E'') ELSE ($1) END || CASE WHEN ($2 IS NULL) THEN (E'') ELSE ($2) END AS "C1" FROM (SELECT 1 AS "C") AS "SingleRowTable1" WHERE TRUE = FALSE
Test project
Metadata
Metadata
Assignees
Labels
No labels