Home

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

Sign In or Register to comment.