title: Only parameterless constructors and initializers are supported in LINQ to Entities message
body: <p>I have a method that returns data from an EF model.</p>
  
  <p>I'm getting the above message, but I can't wotk our how to circumvent the problem.</p>
  
  <pre><code>    public static IEnumerable&lt;FundedCount&gt; GetFundedCount()
      {
          var today = DateTime.Now;
          var daysInMonth = DateTime.DaysInMonth(today.Year, today.Month);
  
          var day1 = DateTime.Now.AddDays(-1);
          var day31 = DateTime.Now.AddDays(-31);
  
          using (var uow = new UnitOfWork(ConnectionString.PaydayLenders))
          {
              var r = new Repository&lt;MatchHistory&gt;(uow.Context);
  
              return r.Find()
                  .Where(x =&gt;
                      x.AppliedOn &gt;= day1 &amp;&amp; x.AppliedOn &lt;= day31 &amp;&amp;
                      x.ResultTypeId == (int)MatchResultType.Accepted)
                  .GroupBy(x =&gt; new { x.BuyerId, x.AppliedOn })
                  .Select(x =&gt; new FundedCount(
                      x.Key.BuyerId,
                      x.Count() / 30 * daysInMonth))
                  .ToList();
          }
      }
  </code></pre>
  
  <p>FundedCount is not an EF enity, MatchHistory is, so can't understand why it is complaining.</p>
  
  <p>All advice appreciated.</p>