I need the subtraction now - a.DateLowStock to be> = 14 days. How can I do it?
ICollection<Product> products = new List<Product>();
DateTime now = DateTime.Now();
using (ApplicationDbContext db = new ApplicationDbContext())
{
products = (from a in db.Products
where now - a.DateLowStock >= "14 dias").ToList
}
return products;
}
DateLowStock is DateTime? and where it says "14 days" is the condition that I want it to comply with in order to add it to the list. Instead of "14 days", what should I put?
Thanks in advance.