title: Subtract dates in Linq EF6
body: <p>Hello i have big problem with Subtract at Linq,EF6.
  I have date where repair should be finieshed. I woluld like to count how many days left.</p>
  
  <p>At ViewModel I have:</p>
  
  <pre><code>public TimeSpan TimeToLeft{get;set;}
  </code></pre>
  
  <p>At repair controler i do sth like this:</p>
  
  <pre><code>var repairsToDo = from r in db.Repairs
  join c in db.Car on r.Car equals c.ID_Car
  join m in db.Models on c.ID_Modelu equals m.ID_Modelu
  join b in db.Brand on m.ID_Brand equals b.Brand
  where r.Data_Zakonczenia&gt;=DateTime.Today 
  select new RepairsToDo { TimeToLeft=(r.EndDate-DateTime.Today) };
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;table class="ShowDataTab"&gt;
          &lt;tr&gt;
              &lt;th&gt;Repair Number&lt;/th&gt;
              &lt;th&gt;Car&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Desc&lt;/th&gt;
              &lt;th&gt;Time to left&lt;/th&gt;
          &lt;/tr&gt;
          @foreach (var item in Model) { 
              &lt;tr&gt;
                  &lt;td&gt;@item.FixNumber&lt;/td&gt;
                  &lt;td&gt;@item.Brand@item.Model&lt;/td&gt;
                  &lt;td&gt;@item.FixName&lt;/td&gt;
                  &lt;td&gt;@item.FixDesc&lt;/td&gt;
                  &lt;td&gt;@item.TimeToLeft&lt;/td&gt;
              &lt;/tr&gt;
          }
  
      &lt;/table&gt;
  </code></pre>
  
  <p>And i got error like this:</p>
  
  <pre><code>dbarithmeticexpression arguments must have a numeric common type
  </code></pre>
  
  <p>How can i Fix it?</p>
  
  <hr>
  
  <p>EDIT1:</p>
  
  <p>Controler:</p>
  
  <pre><code>var today = DateTime.Today;
                  var repairsToDo = from r in db.Repair
                                    join c in db.Car on r.Car equals c.ID_Car
                                    join m in db.Models on c.ID_Model equals m.ID_Model
                                    join b in db.Brand on m.ID_Brand equals b.ID_Brand
                                    where r.EndTime&gt;=DateTime.Today
                                    select new { ... EndTime=r.EndTime };
  
                  var model = repairsToDo.AsEnumerable().Select(raw =&gt; new RepairsToDo {...   TimeLeft= raw.EndTime- today });
  
  return View(model);
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>The model item passed into the dictionary is of type 'System.Linq.Enumerable+WhereSelectEnumerableIterator`2[&lt;&gt;f__AnonymousType1a`7[System.Int32,System.String,System.String,System.String,System.String,System.String,System.DateTime],Praca_Inzynierska.Models.RepairsToDo]', but this dictionary requires a model item of type 'System.Linq.IQueryable`1[Praca_Inzynierska.Models.RepairsToDo]'.
      enter code here
  </code></pre>