1
今私は私のプロジェクトでNHibernate + ASP.NET MVC 3を使用しています。常に私は、このようSchemaExportのを設定する必要があり、新たなクラスモデルを追加します。NHibernate - スキーマのエクスポート
Fluently
.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(connectionString).ShowSql())
.Mappings(m => m.FluentMappings
.AddFromAssembly(typeof(Usuario).Assembly)
.AddFromAssembly(typeof(Empresa).Assembly)
.AddFromAssembly(typeof(TipoUsuario).Assembly))
.ExposeConfiguration(config =>
{
var schemaExport = new SchemaExport(config);
schemaExport.Drop(true, true);
schemaExport.Create(true, true);
})
は毎回SchemaExportのは、テーブルのカップルで、デフォルト値のコレクションを挿入する新しいモデルをエクスポートする方法はありますか?