Jagjit Saini

Jagjit Saini

  • NA
  • 196
  • 38.1k

Linq Query where clause

Apr 4 2022 3:03 PM

Hi

In below query i want data from current date to currentdate - 7 days in where Clause in LINQ.

LDataContext context = new LDataContext();
public List<View_Log> GetLog()
{
    List<View_Log> Result = (from t in context.View_Logs
                                                 orderby t.EntryDate descending
                                    select t).ToList();
    return Result;
}

Thanks


Answers (2)