title: Entityframework Core 3 linq expression could not be translated
body: <p>I just upgrade to EF 3 and one of my queries that used to work, gives an exception now</p>
  
  <pre><code>   ProductionRecords = _context.ProductionRecords
            .Where(r =&gt; r.DataCriacao.Date == DateTime.Now.Date)
              .Select(pr =&gt; new ProductionRecordViewModel
              {
                  Id = pr.Id,
                  Operador = pr.Operador,
                  DataCriacao = pr.DataCriacao,
                  Celula = pr.Celula.Name,
                  Turno = pr.Turno.Name,
                  TotalPecasSemDefeito = pr.ReferenceRecords.Sum(c =&gt; c.Quantity),
                  TotalPecasComDefeito = pr.DefectRecords.Sum(c =&gt; c.Quantidade),
                  TotalTempoParado = pr.StopRecords.Sum(c =&gt; Convert.ToInt32(c.Duration.TotalMinutes)),
              })
            .AsNoTracking()
            .ToList();
  </code></pre>
  
  <p>The exception happens when i'm trying to sum the collection with the timespan with the duration....</p>
  
  <p>How am i supposed to handle this now?</p>
  
  <p>here is the exception</p>
  
  <blockquote>
    <p>InvalidOperationException: The LINQ expression
    '(EntityShaperExpression: EntityType: StopRecord
    ValueBufferExpression: (ProjectionBindingExpression:
    EmptyProjectionMember) IsNullable: False ).Duration.TotalMinutes'
    could not be translated. Either rewrite the query in a form that can
    be translated, or switch to client evaluation explicitly by inserting
    a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or
    ToListAsync(). See <a href="https://go.microsoft.com/fwlink/?linkid=2101038" rel="noreferrer">https://go.microsoft.com/fwlink/?linkid=2101038</a> for
    more information.</p>
  </blockquote>