title: .Net: How can I display full 7 days of the week if my data only represents some days of the week?
body: <p>I am working with an application written in C# which handles an agenda where every day can have some related information. For simplicity reasons, let's define a Day object like the following:</p>
  
  <pre><code>public class Day
  {
      public DateTime date { get; set; }
      public List&lt;string&gt; info { get; set; }
  }
  </code></pre>
  
  <p>There's a function that, given a starting date, will return a list containing all Days in the next week which have some information. Days in the next week that have info.Count = 0 are not in the returned list. Therefore, we can expect to obtain a List object with size 7 or less. Now, I have the following problem:</p>
  
  <p>I want to show all seven days, whether or not they are on the obtained list.</p>
  
  <p>The easy (and inefficient) solution I came up with is to code a function that takes the obtained List, reads it and adds the missing days (if any) into it. This way we always have a list with size 7 and can happily populate an asp:Repeater with it. But I think there is a better way to do this:</p>
  
  <p>It is known in advance that the system has to display the next consecutive seven days starting from the given date. It shouldn't be necessary to have the complete List to display the data. My question is, how can this be done? Am I going into the bad direction by doing this with a repeater?</p>