EntityFramework6.Npgsql
EntityFramework6.Npgsql copied to clipboard
could not determine data type of parameter $1
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
Duplicate of #62