0

I'm using EF Code First with SQL Express 2012.

Everything worked fine until now. I'm getting this error:

DeleteDatabase is not supported by the provider.

public class SqlServerContext : DbContext
{
    public DbSet<Estimate> Estimates { get; set; }

    public SqlServerContext(String connectionString)
    :base(connectionString)
    {
           Database.SetInitializer(new SqlServerContextInitializer());
    }
}

public class SqlServerContextInitializer : DropCreateDatabaseAlways<SqlServerContext>
{
}

Did anyone have similar problem?

Danilo Vulović
  • 2,983
  • 20
  • 31
  • What kind of database are you using? Oracle, SQL Server, MySql. Also can you show the connectionString at the webConfig – Guillermo Oramas R. Mar 18 '14 at 13:09
  • posible duplicate http://stackoverflow.com/questions/17197493/deletedatabase-is-not-supported-by-the-provider-oracle-with-entity-framework – Overmachine Mar 18 '14 at 14:04

0 Answers0