I can use datediffmin() method in SQL, but is there a same method in Linq? Say one field in my table is GeneratedTime which is datetime type. I want to select all records that generated within the last 20min.
return(from m in dc.Msgs
where m.GeneratedTime ????
select m)
This should do the trick: