I want to get lambda function that will query for items which were submitted in the last minute. How to specify this?
var items= Items.Where(i=>DateTime.Now.Subtract(i.Date)...)
Take your pick
var items= Items.Where(i => DateTime.Now.Subtract(i.Date).TotalMinutes < 1)
or
var items= Items.Where(i => DateTime.Now.Subtract(i.Date).TotalSeconds <= 60)
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