EntityFramework6.Npgsql icon indicating copy to clipboard operation
EntityFramework6.Npgsql copied to clipboard

could not determine data type of parameter $1

Open xklonx opened this issue 7 years ago • 1 comments

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

xklonx avatar Apr 11 '18 18:04 xklonx

Duplicate of #62

bgurmendi avatar Apr 30 '18 14:04 bgurmendi