title: linq exception : This function can only be invoked from LINQ to Entities
body: <p>I'm trying to get data which is kept on cache. But it throws an exception on "select new FilterSsrsLog" line. Exception: This function can only be invoked from LINQ to Entities</p>
  
  <pre><code>List&lt;ExecutionLog3&gt; reportServerDB = UpdateCache();
          var reportLog = (from r in reportServerDB
                           orderby r.TimeStart descending
                           where ((model.reportName == null ? true : r.ItemPath.Contains(model.reportName)) &amp;&amp;
                            (model.reportFolder == null ? true : r.ItemPath.Contains(model.reportFolder)) &amp;&amp;
                            (r.TimeStart &gt;= startDateTime) &amp;&amp;
                            (r.TimeStart &lt;= endDateTime)
                           )
                     select new FilterSsrsLog
                     {
                         UserName = r.UserName,
                         ReportName = r.ItemPath,
                         ReportFolder = r.ItemPath,
                         Format = r.Format,
                         Parameters = r.Parameters,
                         TimeStart = r.TimeStart,
                         TimeEnd = r.TimeEnd,
                         TotalTime = EntityFunctions.DiffMilliseconds(r.TimeStart, r.TimeEnd)
                     });
  </code></pre>
  
  <p>If i remove "select new FilterSsrsLog" code block and write "select r" it works. But i need only that coloumns so what can i do to solve this problem?</p>