title: object does not contain a definition for "Properties"
body: <p>I am getting an error </p>
  
  <blockquote>
    <p>An exception of type
    'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in
    System.Core.dll but was not handled in user code Additional
    information: 'object' does not contain a definition for 'CategoryId'</p>
  </blockquote>
  
  <p>below is my code</p>
  
  <pre><code>dynamic product = (from prod in EntityInitializer.inventoryContext.Products
                             join sCat in EntityInitializer.inventoryContext.SubCategories on prod.SubCatID equals sCat.SubCategoryId
                             join vat in EntityInitializer.inventoryContext.VATs on prod.VatID equals vat.VatId
                             where prod.ProdID == proid &amp;&amp; !prod.IsDelete
                             select new
                             {
                                 ProductId = prod.ProdID,
                                 CategoryId = sCat.CategoryId,
                                 SubCategoryID = prod.SubCatID,                               
                                 ProdName = prod.ProdName,
                                 Make = prod.Make,
                                 Finish = prod.ProdFinish,
                                 Price = prod.Price,
                                 Vatid=prod.VatID,
                                 VatValue=vat.VatValue,
                                 Unit = prod.ProdUnit,
                                 Width = prod.ProdWidth,
                                 Depth = prod.ProdDepth,
                                 Height = prod.ProdHeight,
                                 Inch = prod.ProdInch,
                                 ImageURL = prod.ProdImage
                             }).FirstOrDefault();
  </code></pre>
  
  <p>I want to retrieve <strong>CategoryId</strong> from <strong>product</strong> and product has contain all records which you can easily find in below attached image.</p>
  
  <p><a href="http://i.stack.imgur.com/6athN.png" rel="nofollow">http://i.stack.imgur.com/6athN.png</a></p>
  
  <p><strong>error image</strong>
    <a href="http://i.stack.imgur.com/ra0rL.png" rel="nofollow">http://i.stack.imgur.com/ra0rL.png</a></p>