title: Anonymously Hosted DynamicMethods Assembly
body: <p>In my mvc web application, I am getting this error:</p>
  
  <blockquote>
    <p>Anonymously Hosted DynamicMethods Assembly<br>
    Stack Trace : at Read_&lt;>f__AnonymousType1<code>4(ObjectMaterializer</code>1 ) at System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() at project.com.Concrete.DetailsRepository.GetDetails(String type) in path<br>
    Message : The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type.</p>
  </blockquote>
  
  <p>When I run my site from local server it is working fine.
  But when it runs at remote server it is giving above error</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var res=
  (from r in DetailsTable 
   where r.Activated == true 
   group r by new { r.ActivationDate, r.ProductID, r.SubProductID } into t 
   select new { icount = t.Count(), 
                sActivationDate = t.Key.ActivationDate.ToShortDateString(), 
                iProductID = t.Key.ProductID, 
                iSubProductid = t.Key.SubProductID })
  .OrderBy(r =&gt; r.icount);
  </code></pre>
  
  <p>Thanks
  AS</p>