Every time I do update-database -v -f I want my database to be fully dropped and then created empty again. Is it possible to do?
I tried to delete it and then create it but it doesn't work. Strange thing that I did exactly same thing in EF4 and it did work, but now it does not.
So how can I re-create my database using some command?
Migrations is enabled for context 'MainDataContext' but the database does not exist or contains no mapped tables. Use Migrations to create the database and its tables, for example by running the 'Update-Database' command from the Package Manager Console.
This is my seed method
protected override void Seed(Api.Models.MainDataContext context)
{
context.Database.Delete();
context.Database.Create();
// context.Database.Initialize(true); Also tried this but same result
}
Note: Truncate with raw queries does not work, too many relations.
Note: Delete all objects is bad idea, too many objects.