title: Issue with MVC5 entity framework
body: <p>I am using ASP.NET MVC5, Entity Framework 6 in Visual Studio 2013 in my web application. I am trying my model to work but getting error for one reason another. I have tried both Fluent API and just model on its own. I am sure it must be something silly but I am stuck.. need help. Currently I am getting error in mapping and modeling classes .. i have add the controller in which when i debug for var=a1 i get following error </p>
  
  <p>An exception of type 'System.Data.Entity.ModelConfiguration.ModelValidationException' occurred in EntityFramework.dll but was not handled in user code </p>
  
  <p>Test Model class</p>
  
  <pre><code>public class TestModel
  {
      public int testID { get; set; }
      public string Title { get; set; }
  }
  </code></pre>
  
  <p>Mapping Class</p>
  
  <pre><code>public class TestMap : EntityTypeConfiguration&lt;TestMap&gt;
  {
      public TestMap()
      {
          // Primary Key
          this.HasKey(t =&gt; t.testID);
  
          // Properties
          this.Property(t =&gt; t.Title)
              .IsRequired()
              .HasMaxLength(50);
  
          // Table &amp; Column Mappings
          this.ToTable("testTable");
          this.Property(t =&gt; t.testID).HasColumnName("testID");
          this.Property(t =&gt; t.Title).HasColumnName("Title");
      }
  }
  </code></pre>
  
  <p>Context</p>
  
  <pre><code>public class My_Context : DbContext
  {
      public My_Context()
          : base("name=My_Context")
      {
      }
  
      protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
           Database.SetInitializer&lt;DORIS_Context&gt;(new CreateDatabaseIfNotExists&lt;DORIS_Context&gt;());
          //modelBuilder.Configurations.Add(new TestMap());    
      }
  
      public DbSet&lt;TestModel&gt; Test { get; set; }
  }
  </code></pre>
  
  <p>Web.config</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="My_Context"
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <h2>controller</h2>
  
  <pre><code> public class TestController : Controller
  {
      //
      // GET: /Test/
      public ActionResult Index()
      {
          using (var db = new DORIS_Context())
          {
              var query = from b in db.Test
                          orderby b.testID
                          select b;
  
              foreach (var item in query)
              {
                  var a1 = item.Title;
              }
          }
  
          return View();
      }
  }
  </code></pre>