In my configuration, I have the following:
public sealed class Configuration : DbMigrationsConfiguration<App.Repository.NogginatorDbContext> { public Configuration() { AutomaticMigrationsEnabled = true; } protected override void Seed(AppDbContext context) { SqlConnection.ClearAllPools();
This is used for test db, which should fall and recreate every time. Although, when I click "update-database" from the package manager console, even if the database is manually deleted before starting, I get:
It is not possible to delete the database "Nogginator.Test" because it is currently in use.
My connection string:
<add name="TestConnection" providerName="System.Data.SqlClient" connectionString="Data Source=.\;Initial Catalog=App.Test;Trusted_Connection=True;MultipleActiveResultSets=True;" />
Why is this happening?
source share