title: MVC 4 project using a class library EF model
body: <p>Using an EF model in the <strong>Models folder</strong> in my MVC 4 project, I succeeded to display data in a razor view using a coded class named <strong>Prod</strong> and a controller method as next:</p>
  
  <pre><code>public ActionResult Index()
  {
      IEnumerable&lt;Prod&gt; Pr = from p in db.Products
                                      select new Prod
                                      {
                                          ProductId = p.ProductID, 
                                          ProductName = p.ProductName
                                      };
      return View(Pr); 
  }
  </code></pre>
  
  <p>Now I am trying to do the same thing using a model in a class library instead of the current one, so I added to my solution a new class library, added then a model using the same connection string, and mapping the same entities, then added to my MVC project a reference to the new class library, and put at the top of both <strong>MyController</strong> and <strong>Prod</strong> class the next:</p>
  
  <pre><code>using MyClassLibrary;
  </code></pre>
  
  <p>Then I deleted the old model, now when I try to display the view, I get the following error: </p>
  
  <p><em><strong>Unable to load the specified metadata resource.</em></strong></p>
  
  <p>Any help please ?</p>