Can we display linq result in view without using model
<p>I was trying to display the result without model(CLASS), I already have a department and Employee class, now to show their joined result I don't want to make another class which contains EmpName and Department Name property.</p>

<p>IN MODEL</p>

<pre><code> public class EmpDetails
    {     
        public int EmpID { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
         public int DepartmentID { get; set; }
}
 public class Department
{
        public int DepartmentID { get; set; }
        public string DepartmentName { get; set; }
        public string Location { get; set; }
}
</code></pre>

<p>IN CONTROLLER</p>

<pre><code>  var q = (from ED in cc.EmpDetails
join DT in cc.Department
on ED.DepartmentID equals DT.DepartmentID
select new {
ED.Name,
DT.DepartmentName
});

ViewBag.ListData = q;
</code></pre>

<p>IN VIEW</p>

<blockquote>
  <p>ERROR :: 'object' does not contain a definition for 'Name' </p>
</blockquote>

<pre><code> foreach (var item in ViewBag.ListData)
        {
            &lt;div&gt;
                @item.Name
            &lt;/div&gt; 
         &lt;div&gt;
                @item.DepartmentName
            &lt;/div&gt; 
        }
</code></pre>

<p>I want it to be done without using model                                               </p>