Provide means to clear database for testing code first models
One of the complexities of testing your data layer is to ensure that the database exists with the expected data. With EF code first, its becoming increasingly difficult to know how to clear the data in the database before seeding it with test data and running the tests.
Using the configuration in the DbContext, provide the means to clear all data from the database, or a table taking the various constraints and relationships into account.
6
votes
Werner Strydom
shared this idea