Note that there are some explanatory texts on larger screens.

plurals
  1. PO'object' does not contain a definition for 'Name'
    text
    copied!<p>I'm using two DataContext objects to return seperate AsQueriable() datasets then joining the two using linq. The data construction works perfectly however when I pass that combined dataset to the view, I'm getting the error 'object' does not contain a definition for 'Name'.</p> <p>During a debug session I can clearly see that both the parent Model and each 'item' in the foreach loop has all the data and keys visible/accessible. I'm very confused. </p> <p>Many of the other q&amp;a's on stackoverflow.com that match this problem don't solve my issue and as a result would appreciate a fresh set of eyes and hopefully a solution to this problem.</p> <p>Many thanks! - code time:</p> <p>The data construction</p> <pre><code> public ActionResult SplashImages() { var g = (from i in GetGallerySplash() join o in GetFestivals() on i.Festival equals o.ID orderby i.Rating descending select new {i.Photo, i.OwnedBy, i.Rating, o.Name }); Response.ContentType = "text/xml"; return View(g); } private IEnumerable&lt;Gallery&gt; GetGallerySplash() { GallerysDataContext gdc = new GallerysDataContext(); return (from i in gdc.Galleries orderby i.Rating descending select i).Take(15).AsQueryable(); } private IEnumerable&lt;Festival&gt; GetFestivals() { FestivalsDataContext fdc = new FestivalsDataContext(); return (from i in fdc.Festivals select i).AsQueryable(); } </code></pre> <p>VSExpress's error screen: <img src="https://i.stack.imgur.com/Yep3l.png" alt="Exception screenshot"></p> <p>Any guidance on a solution would be greatly appreciated. Thank you!</p> <p>C</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload