We have an ASP.NET Core MVC application with Entity Framework Core in it. We have added a custom Testing
environment to the existing Development
, Staging
and Production
environments. Now, we would like the application to drop and recreate (or at least truncate) the database every time the application starts in this new Testing environment.
Is there an automated way how to achieve this behavior? Or do I have to manually call RemoveAll
on each DbSet
in the database context?