I need to check the otp generated time. When user entered otp it will expire with in 5 minutes. I need a query in entity framework or linuq
I wirte like below but i am not getting result, I thought it wrong can any help me
query
-------
var login = _context.MobileOtp.FirstOrDefault(i => i.MobileNumber == mobileNumber && (i.CreateDate.Minute - DateTime.Now.Minute) <= 5 && i.Otp == otp);
Please ASAP

Mario ScheerenRank #1,371 · 1.2K reputationPosted Jun 6, 2019, 2:17 AM EDT
Harish BatchuRank #6,801 · 256 reputationPosted Jun 7, 2019, 2:28 AM EDT