2
Answers

Linq Query where clause

Jagjit Saini

Jagjit Saini

2y
652
1

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)