title: Entity framework does not create table in DB
body: <p>So first of all I dont know what Entity Framework version I am using. I am assuming its 4 but how do I check? </p>
  
  <p>Second i have the following connection string in web.config:</p>
  
  <pre><code>  &lt;connectionStrings&gt;
  
  &lt;add name="DBEntites"
       connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
       providerName="System.Data.SqlClient" /&gt;
  
  &lt;add name="ApplicationServices"
       connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
       providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>As you can see they are the same DB. In fact they are the DB created by asp.net Membership Provider.</p>
  
  <p>Now I have the following Model:</p>
  
  <pre><code>public class Profile {
      [Key]
      public string username { get; set; }
  
      [Display(Name = "Full Name")]
      public string FullName { get; set; }
  
  }
  </code></pre>
  
  <p>Simple enough? </p>
  
  <p>Then I have the following class that connects to the DB:</p>
  
  <pre><code>   public class DBEntities : DbContext {
          public DbSet&lt;Profile&gt; Profiles { get; set; }
      }
  </code></pre>
  
  <p>Then in my Account Controller, infact this is the same controller created by the VS2010 when you choose a new MVC3 project.</p>
  
  <pre><code> [HttpPost]
   public ActionResult  Register(RegisterModel model) {
              if (ModelState.IsValid) {
                  // Attempt to register the user
                  MembershipCreateStatus createStatus;
                  Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus);
                  Profile pm = new Profile();
                  pm.username=model.UserName;
                  pm.FullName="unknown";
  
                  db.Profiles.Add(pm);
                  db.SaveChanges();
  
  
  
                  if (createStatus == MembershipCreateStatus.Success) {
                      FormsAuthentication.SetAuthCookie(model.UserName, false /* createPersistentCookie */);
                      return RedirectToAction("Index", "Home");
                  } else {
                      ModelState.AddModelError("", ErrorCodeToString(createStatus));
                  }
              }
  
              // If we got this far, something failed, redisplay form
              return View(model);
          }
  </code></pre>
  
  <p>SO when i run this application, it runs through without exceptions. If I add a new user, the new user is added to the asp.net membership tables. So from my understanding the Entity framework should create a table called "Profile" with the two columns "username" and "fullname". </p>
  
  <p>However, it dosn't. Why is it the code can step through without exceptions, the <code>db.SaveChanges()</code> can go through, yet there is not table created?</p>
  
  <p>What am I doing wrong? </p>
  
  <p>edit: I think the table is there beause if I try to create an entry with the same username (obviously can't since its a Primary Key), it throws an exception saying the entry already exists. </p>
  
  <p>BUT I cant seem to find the table!</p>