title: How to filter list that has date and retrieve only data within 7 days
body: <p>So I have this model:</p>
  
  <pre><code>Student Model
  
  public int StudentId {get; set;}
  public string StudentName {get; set;}
  public DateTime EnrollDate {get; set;}
  </code></pre>
  
  <p>I also have a list of student Model which is something like</p>
  
  <pre><code>List&lt;Student&gt; listOfStudents = new List&lt;Student&gt;();
  </code></pre>
  
  <p>and inside that list there are 100 students detail and the enroll date.</p>
  
  <p>What I do next is to sort the list into showing from the latest one to the oldest one.</p>
  
  <pre><code>listOfStudents.Sort((x, y) =&gt; DateTime.Compare(y.EnrollDate, x.EnrollDate));
  </code></pre>
  
  <p>and it's working. However, I am currently struggling in showing only the EnrollDate within 7 days from Today.</p>