This simple statement which used to work in 2.2 DOES NOT WORK anymore in 3.1. I get the error:
var qry = from p in ctx.Shifts where p.StartTime < 1
select p;
var list = qry.ToList(); //This fails
NOTE THAT both ">" and "<" do not work but "==" works.
The object is as shown below
public class Shift
{
public decimal StartTime {get;set;}
public decimal EndTime {get;set;}
}
I get the error:
System.InvalidOperationException : The LINQ expression 'DbSet .Where(p => p.StartTime < 1)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync()