title: Error on page: The model item passed into the dictionary is of type 'System.Data.Entity.DynamicProxies
body: <p>I get this error on my Details view page:</p>
  
  <pre><code>The model item passed into the dictionary is of type 'System.Data.Entity.DynamicProxies.cpd_certificates_65AF30842281867E2F4F6A1026590271109C12A85C8175394F14EF6DE429CBC7', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[cpd.Models.cpd_certificates]'. 
  </code></pre>
  
  <p><strong>This is my controller :</strong></p>
  
  <pre><code> public class Default8Controller : Controller
  {
      //
      // GET: /Default8/
      private cpdDbContext db = new cpdDbContext();
  
      public ActionResult Index()
      {
  
  
          return View(db.CPD.ToList());
      }
  
      //
      // GET: /Default8/Details/5
  
      public ActionResult Details(int id)
      {
  
          cpd_certificates cpd_ = db.Cert.Find(id);
  
          return View(cpd_);
      }
  </code></pre>
  
  <p><strong>Below is my Details view:</strong> </p>
  
  <pre><code>@model IEnumerable&lt;cpd.Models.cpd_certificates&gt;
  
  @{
      ViewBag.Title = "Details";
  }
  
  &lt;h2&gt;Details&lt;/h2&gt;
   &lt;table&gt;
          &lt;tr&gt;
              &lt;th&gt;
                  certificateNo
          &lt;/th&gt;
          &lt;th&gt;
              Mark
          &lt;/th&gt;
            &lt;th&gt;&lt;/th&gt;
      &lt;/tr&gt;
         @foreach (var item in Model) {
              &lt;tr&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.CertificateNo)
          &lt;/td&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.Mark)
          &lt;/td&gt;
  
      &lt;/tr&gt;
  }
  
  &lt;/table&gt;
  </code></pre>
  
  <p>Below is the cpd_certificates model:</p>
  
  <pre><code>public class cpd_certificates
  {
  
          [Key]
          public int CertificateNo { get; set; }
          public int QuizNo { get; set; }
  
  
          public DateTime? DateReceived { get; set; }
          public DateTime? DatePaid { get; set; }
          public string Mark { get; set; }
          public int? AccreditationNo { get; set; }
  
  
          public int? ID { get; set; }
          public virtual cpd_recipients Recipients { get; set; }
  
  }
  </code></pre>
  
  <p>I have two models and I can view the list on my Index. I intended that when I click the details link it takes me to details of certificates earned and exams which are in another model/table. So in short two models which have a PK ID for CPD and FK ID on Cert. Index page show just personal information and this page is fine. 
  When Details is clicked it then shows the other model/table data that is the many certificates of that person. </p>