What is the fastest way to clear out a database using NHibernate?

Posted by csetzkorn on Stack Overflow See other posts from Stack Overflow or by csetzkorn
Published on 2010-03-17T11:14:07Z Indexed on 2010/03/17 13:21 UTC
Read the original article Hit count: 129

I intend to perform some automated integration tests. This requires the db to be put back into a 'clean state'. Is this the fastest/best way to do this?

var cfg = new Configuration();  
cfg.Configure();  
cfg.AddAssembly("Bla"); 
new SchemaExport(cfg).Execute(false, true, false);

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about integration-testing