title: Unable to retrieve metadata - MVC4 and Entity Framework
body: <p>I'm building a MVC application and I'm using Entity Framework Code First.
  I have a Project.Web that containes my MVC files.</p>
  
  <p>I also have another project named Project.Data that contains my context as follows :</p>
  
  <pre><code> public DataModel()
          : base("name=DataModel")
      {
      }
  
      public DbSet&lt;DeploymentStatusReport&gt; DeploymentStatusReports { get; set; }
  </code></pre>
  
  <p>And I have my data objects in another class within thie project which look like this:</p>
  
  <pre><code> [Table("DeploymentStatusReport")]
  public class DeploymentStatusReport
  {
      [Display(Name = "Release Name")]
      [Required]
      public string ReleaseName { get; set; }
  
      [DataType(DataType.Date)]
      [Display(Name = "Created Date")]
      public DateTime CreatedDate { get; set; }
  
      [DataType(DataType.Date)]
      [Display(Name = "Sent Date")]
      public DateTime SentDate { get; set; }
  
      public string Type { get; set; }
  
      public string Status { get; set; }
  }
  </code></pre>
  
  <p>I have my connection string in both "Project.Web > web.config" and "Project.Data > App.config", Which I don't know if I need it in web.config or not. Because I want my Project.Data to take care of Data Connections. Not the Web.</p>
  
  <p>I Also have my reference CopyToLocal set to true. (The reference I have to Project.Data in Project.Web)</p>
  
  <p>But still when I want to add a controller based on my object it says it's unable to retrieve metadata. :( :</p>
  
  <pre><code>Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
  </code></pre>
  
  <p>Any idea ? I got stuck :(</p>