I am new to a relatively large project using a Microsoft SQL server database with C# and the Entity Framework.
The current development process is like this:
- Code some feature/intend to fix a bug
- Start the application
- Make some changes via GUI to the database testing the coded functionality/testing if the bug was fixed
- In case of failure -> run SQL scripts to delete the complete database changes and repeat the whole procedure
I am wondering if there is any "test/developer"-mode for SQL databases that could automatically revert the applied changes. Basically, while the program is running, everything should be inserted/updated/deleted to the actual database, but afterwards all changes should automatically be reverted. Is my thought completely unreasonable? Is our procedure with the SQL scripts more or less state of the art for database development?
Thanks in advance!
Edit : We are using a developer database and the code first approach of Entity. It is still very annoying to me to run SQL scripts every time to keep my developer database "clean/usable/free from corrupt data". Also sometimes you code functionality that is supposed to work only once in production and coding that feature, requires you to test it a couple of times which means you need to reset the database once/times tested.