title: Select List returns System.Data.Entity.DynamixProxies instead of values in MVC asp.net C#
body: <p>I have got two different tables. User and ProjectDetails. There are two different controllers as well to do CRUD operations on these tables. Now, I have a case where, in the User CREATE operation, I have to select the Project from the List of Projects in ProjectDetails. I tried the following: </p>
  
  <p>In the user model, I created this line:</p>
  
  <pre><code>    public IEnumerable&lt;ProjectDetail&gt; ProjectDetail { get; set; }
  </code></pre>
  
  <p>And in the controller, in the create Action, I have added the following code:</p>
  
  <pre><code>    public ActionResult Create()
      {
          var model = new UserDetail
          {
              ProjectDetail = db1.ProjectDetails
          };
          return View(model);
      } 
  </code></pre>
  
  <p>And in the create view, I am trying to get the list of Project IDs as follows:</p>
  
  <pre><code>@Html.DropDownListFor( x =&gt; x.ProjectDetail, new SelectList(Model.ProjectDetail, "Project ID"))
  </code></pre>
  
  <p>However, wen i run, i get the number of lines (as equal to the number of projects) as </p>
  
  <p>System.Data.Entity.DynamicProxies.ProjectDetails_F########### (Some numbers)..</p>
  
  <p>Please can someone help me?</p>
  
  <p>Regards,
  Hari</p>
  
  <p>[EDIT] - I checked in the debug mode and found the following.. Tried attaching the image.. </p>
  
  <p>I drilled down that Proxy things and found ProjectID there. How can I get that? </p>