Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: Performance issue with single value constant.

$
0
0
The solution was deceptively simple. Make the single value list is a constant inside the expression (rather than a parameter) and the recompileRequired code does not get triggered:
var result = (from t in Table
  select new TableModel() 
  {
    Name = t.Name,
    List = (from o in (new int[] { 0 }) where t.SomeValue != null select t.SomeValue),
  }
);

Viewing all articles
Browse latest Browse all 1793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>