Refactoring after grouped in Linq Is there any way to refactor this?

objLeadTimeReportResult = 
    (from prop in propList
     join book in booking on prop.PropertyId equals book.PropertyId into j
     from book in j.DefaultIfEmpty()
     group book by new { prop.PropertyId, prop.PropertyName } into groupedLeadTime
         select new LeadTimeReportResult
         {
             PropertyId = groupedLeadTime.Key.PropertyId,
             PropertyName = groupedLeadTime.Key.PropertyName,
             Today = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days == 0) ? 1 : 0),
             Days1_2 = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days &gt;= 1 &amp;&amp; (item.CheckInDate.Date - item.BookingDate.Date).Days &lt;= 2) ? 1 : 0),
             Days3_6 = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days &gt;= 3 &amp;&amp; (item.CheckInDate.Date - item.BookingDate.Date).Days &lt;= 6) ? 1 : 0),
             Days7_10 = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days &gt;= 7 &amp;&amp; (item.CheckInDate.Date - item.BookingDate.Date).Days &lt;= 10) ? 1 : 0),
             Days11_15 = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days &gt;= 11 &amp;&amp; (item.CheckInDate.Date - item.BookingDate.Date).Days &lt;= 15) ? 1 : 0),
             Days16_30 = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days &gt;= 16 &amp;&amp; (item.CheckInDate.Date - item.BookingDate.Date).Days &lt;= 30) ? 1 : 0),
             Days31_45 = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days &gt;= 31 &amp;&amp; (item.CheckInDate.Date - item.BookingDate.Date).Days &lt;= 45) ? 1 : 0),
             Days46_60 = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days &gt;= 46 &amp;&amp; (item.CheckInDate.Date - item.BookingDate.Date).Days &lt;= 60) ? 1 : 0),
             Days60Plus = groupedLeadTime.Sum(item =&gt; ((item.CheckInDate.Date - item.BookingDate.Date).Days &gt; 60) ? 1 : 0)
         }).ToList();




Additional Information

My senior programmer told me to use some instead of count, he claimed that it would make better performance when using on MSSQL Server.
(1). You can create an exntession method to check that item is within the range.

(2). I'd use Count instead of Sum because you just count the number of days in specified interval. It's more natural.

(3). I'd check performance of this query and try to cache result of this join and/or grouping by using some method that requires eager evaluation. ToList() for example. It can help with a lot of traverals of every group in Sum()/Count() methods.

(4). Note for additional information. Even if Sum() in Linq To SQL is a lot faster than Count() you still can have MyCount() implemented as Sum() inside. This will allow you to have a good performance as your senior programmer mentioned and hide this "? 1 : 0" conidition.

 var tempQuery = from prop in propList
                                       join book in booking on prop.PropertyId equals book.PropertyId into j
                                       from book in j.DefaultIfEmpty()
                                       group book by new { prop.PropertyId, prop.PropertyName }.ToList();

 objLeadTimeReportResult = from tempVar in tempQuery
                                 select new LeadTimeReportResult
                                       {
                                           PropertyId = tempVar.Key.PropertyId,
                                           PropertyName = tempVar.Key.PropertyName,
                                           Today = tempQuery.Count(item =&gt; (item.WithinRange()),
                                           Days1_2 = tempQuery.Count(item =&gt; (item.WithinRange(1,2)),
                                           Days3_6 = tempQuery.Count(item =&gt; (item.WithinRange(3,6)),
                                           Days7_10 = tempQuery.Count(item =&gt; (item.WithinRange(7,10)),
                                           Days11_15 = tempQuery.Count(item =&gt; (item.WithinRange(11,15)),
                                           Days16_30 = tempQuery.Count(item =&gt; (item.WithinRange(16,30)),
                                           Days31_45 = tempQuery.Count(item =&gt; (item.WithinRange(31,45)),
                                           Days46_60 = tempQuery.Count(item =&gt; (item.WithinRange(46,60)),
                                           Days60Plus = tempQuery.Count(item =&gt; (item.GreaterThan(60));
}.ToList();