Here is my configuration:
this.factory = Fluently.Configure().
Database(SQLiteConfiguration.Standard.UsingFile("foo.db").
ShowSql()).
Mappings(m => m.FluentMappings.AddFromAssemblyOf<Bar>()).
ExposeConfiguration(BuildSchema).
BuildSessionFactory();
BuildSchema is as follows:
private static void BuildSchema(Configuration config)
{
new SchemaExport(config).Create(false, true);
}
Fortunately, this works great and creates a file called foo.db that I can read and write. Unfortunately, every time I run this code, foo.db is overwritten. How can I configure (Fluent) NHibernate to create a file only if it does not already exist?
source
share