با درود
من یک مدل دارم به این شکل
public class Person
{
public int id { get; set; }
public string name { get; set; }
public string Family { get; set; }
}


و یک کلاس context برای code first

  public class PersonContext : DbContext
{
// You can add custom code to this file. Changes will not be overwritten.
//
// If you want Entity Framework to drop and regenerate your database
// automatically whenever you change your model schema, add the following
// code to the Application_Start method in your Global.asax file.
// Note: this will destroy and re-create your database with every model change.
//
// System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChange s<MvcApplication1.Models.PersonContext>());

public PersonContext() : base("name=PersonContext")
{
}

public DbSet<Person> People { get; set; }
}


و conection string نیز به صورت زیر است

<add name="PersonContext" connectionString="Data Source=(localdb)\v11.0; Initial Catalog=PersonContext-20121006194924; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|PersonContext-20121006194924.mdf"
providerName="System.Data.SqlClient" />


اما من دیتابیس ساخته نمیشود
OS : ویندوز 8
Visual stduio 2012
روی سرور خودم هم امتحان کردم به غیر از LocalDB اما باز نشد
لطفا راهنمایی کیند
سپاس