I am developing an app with NHibernate, using an embedded database (SQL CE). To keep it simple, let's say I have two projects in a VS 2008 solution; the application (a WinForms app) and my unit test app. And let's say my domain classes are in the WinForms app. (No, I'm not actually doing this. But I want to keep the question as simple as I can!)
Right now, the database file is in my test project, since that is what is 'driving' the application. I've been told that NHibernate requires it to be in the driver app.
That means that I am going to need to copy the database over to the WinForms app for production, and I am uncomfortable doing that, since it forks the database used for testing and production. I see a real risk of the two copies getting out of sync.
So, here's my question: Can I configure NHibernate so that the embedded database used for testing can be located in the WinForms app, instead of the unit test app? That way, I can avoid working with two copies of the database.
Thanks for your help!
David Veeneman
Foresight Systems
|