Хорошо, поэтому я только что обновил NuGet до EF Code First 4.1, и теперь я получаю следующую ошибку сборки в своем классе JobSiteContext.cs:
"Имя DbDatabase" не существуеттекущий контекст "
Вот мой код:
public class JobSiteContext : DbContext
{
public DbSet<JobSite.Models.Job> Jobs { get; set; }
public DbSet<JobSite.Models.Location> Locations { get; set; }
public DbSet<JobSite.Models.Profile> Profiles { get; set; }
public JobSiteContext()
{
// Instructions:
// * You can add custom code to this file. Changes will *not* be lost when you re-run the scaffolder.
// * If you want to regenerate the file totally, delete it and then re-run the scaffolder.
// * You can delete these comments if you wish
// * If you want Entity Framework to drop and regenerate your database automatically whenever you
// change your model schema, uncomment the following line:
DbDatabase.SetInitializer(new DropCreateDatabaseIfModelChanges<JobSiteContext>());
}
}
Может кто-нибудь указать мне правильное направление?
Спасибо, Пол