I've installed EFCodeFirst 0.8 (CTP5) and EFCodeFirst.SQLServerCompact 0.8.84821. I've updated the references to EntityFramework and System.Data.SqlServerCe.Entity.dll. My project compiles and runs, with one exception: I can not call Database.SetInitializer.
Here is how my code looks:
using System.Data.Entity;
namespace Recipes.Models
{
public class RecipesEntities : DbContext
{
public RecipesEntities()
{
System.Data.Entity.Database.SetInitializer<RecipesEntities>(new SampleData());
//Database.SetInitializer<RecipesEntities>(new SampleData());
}
public DbSet<Category> Categories { get; set; }
...
}
}
and the error I get is
The type or namespace 'SetInitializer' does not exist in the namespace 'System.Data.Entity.Database
Indeed, it does not show up in the Intellisense. However, as I said - if I comment out the line that calls SetInitializer, the project compiles and runs. I can not test it properly though cause most operations depend on some seed data in the DB.
What could be the reason for such behaviour?