EF.Functions.SmallDateTimeFromParts has no supported translation
When i try:
var employees = EMPLOYEES.AsNoTracking().Where(x => EF.Functions.SmallDateTimeFromParts( Convert.ToInt32(x.DD_UITDIENST.Substring(0, 4)),
Convert.ToInt32(x.DD_UITDIENST.Substring(5, 2)), Convert.ToInt32(x.DD_UITDIENST.Substring(8, 2)), 0, 0) < DateTime.Now);
It gives me : NotSupportedException: Method 'System.DateTime SmallDateTimeFromParts(Microsoft.EntityFrameworkCore.DbFunctions, Int32, Int32, Int32, Int32, Int32)' has no supported translation to SQL.
?
Comments
Maybe that combination of functions is too complex for EF Core to handle. You might get more luck posting this question on Stack Overflow.