I am using EntityFunctions class in my LINQ query as:
var a = dbContext.Where(x=>EntityFunctions.DiffMinutes(dateA,dateB)<1)
However I want an absolute value of the difference, so that I do not have to worry which date is greater.
Can anyone suggest how to do it.
Try:
var a = dbContext.Where(x => Math.Abs(EntityFunctions.DiffMinutes(dateA,dateB)) < 1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With