Is it possible to delete all data in the database using NHibernate. I want to do that before starting each my unittests. Currently I drop my database and create it again but this is not acceptable solution for me.
========================================================== ok, here are the results. I am testing this on one database (Postgre). I will test CreateSchema(1), DanP solution(2) and apollodude217 solution(3). I run the tests 5 times with each method and take the average time.
Round 1 - 10 tests
(1) - ~26 sec
(2) - 9,0 sec
(3) - 9,3 sec
Round 2 - 100 tests
(1) - Come on, I will not do that on my machine
(2) - 12,6 sec
(3) - 18,6 sec
I think that it is not necessary to test with more tests.