title: can't get data using entity framework
body: <p>I'm try to create web app using asp.net MVC4 I created TeacherController in my controller folder and model also finally i add Db-context also.  I'm using sql server. </p>
  
  <p>DbContext like this </p>
  
  <pre><code>using MvcTest2.Models;
  using System;
  using System.Collections.Generic;
  using System.Data.Entity;
  using System.Linq;
  using System.Web;
  
  namespace MvcTest5.Models.nuwan600
  {
      public class nuwan600:DbContext
      {
          public DbSet&lt;Qualifications&gt; Qualifications { get; set; }
          public DbSet&lt;School&gt; School { get; set; }
          public DbSet&lt;Teacher&gt; Teacher { get; set; }
      }
  }
  </code></pre>
  
  <p>Teacher model</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel.DataAnnotations;
  using System.ComponentModel.DataAnnotations.Schema;
  using System.Linq;
  using System.Web;
  
  namespace MvcTest2.Models
  {
      [Table("Teachers")]
      public class Teacher
      {
          [Key]
          public int TeacherID { get; set; }
          public String Name { get; set; }
          public int NIC { get; set; }
          public String Address { get; set; }
          public int Telephone { get; set; }
  
          public int SchoolID { get; set; }
          public int QualificationID { get; set; }
      }
  }
  </code></pre>
  
  <p>and TeacherController</p>
  
  <pre><code>public ActionResult Index()
  {
      int id = 1;
      nuwan600 Teachers = new nuwan600();
      Teacher teachermodle = Teachers.Teacher.Single(emp =&gt; emp.TeacherID==id);
      return View(teachermodle);
  }
  </code></pre>
  
  <p>When I run this I got run time error (on this line: <code>Teacher teachermodle = Teachers.Teacher.Single(emp =&gt; emp.TeacherID==id);</code> )</p>
  
  <blockquote>
    <p>One or more validation errors were detected during model generation:<br>
    MvcTest5.Models.nuwan600.Qualifications: EntityType 'Qualifications' has no key defined. Define the key for this EntityType.<br>
    Qualifications: EntityType: EntitySet 'Qualifications' is based on type 'Qualifications' that has no keys defined.<br>
    System.Data.Entity.ModelConfiguration.ModelValidationException</p>
  </blockquote>
  
  <p>How can fix this ? error need a help.</p>