title: constructor of methods chain (LINQ)
body: <p>I have the following query:</p>
  
  <pre><code>private IEnumerable&lt;EventSchedule&gt; GetTodaySchedules(string tab)
  {
      var today = DateTime.Now.Date;
  
      var result = Database.EventSchedules.Where(s =&gt; 
      s.RecurrenceStart.Value.Date &lt;= today &amp;&amp; 
      s.RecurrenceStart.Value.TimeOfDay &gt; today.TimeOfDay &amp;&amp;
      s.RecurrenceEnd.Value.Date &gt;= today &amp;&amp;
      s.BaseEvent.EndShow &gt; DateTime.Now &amp;&amp;
      s.BaseEvent.IsApproved.Value &amp;&amp; !s.IsRemoved.Value &amp;&amp;
      s.BaseEvent.EventsCategories.Any(c =&gt; c.EventCategory.Name == tab)).ToList();
  }
  </code></pre>
  
  <p>This query select today events from <code>EventSchedule</code> table. The problem in that, sometimes <code>tab</code> is empty and this query return no records. I can write something like that:</p>
  
  <pre><code>private IEnumerable&lt;EventSchedule&gt; GetTodaySchedules(string tab)
      {
          var today = DateTime.Now.Date;
          if(string.IsNullOrWhiteSpace(tab))
          {
               var result = Database.EventSchedules.Where(s =&gt; 
               s.RecurrenceStart.Value.Date &lt;= today &amp;&amp; 
               s.RecurrenceStart.Value.TimeOfDay &gt; today.TimeOfDay &amp;&amp;
               s.RecurrenceEnd.Value.Date &gt;= today &amp;&amp;
               s.BaseEvent.EndShow &gt; DateTime.Now &amp;&amp;
               s.BaseEvent.IsApproved.Value &amp;&amp; !s.IsRemoved.Value).ToList();
          {
          else
          {
               var result = Database.EventSchedules.Where(s =&gt; 
               s.RecurrenceStart.Value.Date &lt;= today &amp;&amp; 
               s.RecurrenceStart.Value.TimeOfDay &gt; today.TimeOfDay &amp;&amp;
               s.RecurrenceEnd.Value.Date &gt;= today &amp;&amp;
               s.BaseEvent.EndShow &gt; DateTime.Now &amp;&amp;
               s.BaseEvent.IsApproved.Value &amp;&amp; !s.IsRemoved.Value &amp;&amp;
               s.BaseEvent.EventsCategories.Any(c =&gt; c.EventCategory.Name == tab)).ToList();
          }
  
      }
  </code></pre>
  
  <p>but it's ugly. There is a other way?<br>
  Thanks.</p>