NHibernate IDataBaseSchema.GetTableMetadata方法采用数据行。我该如何使用这种方法?

时间:2012-06-06 18:45:52

标签: database sqlite nhibernate schema hbm2ddl

我正在尝试验证表是否已创建。我正在使用SQLite和NHibernate。

new SchemaExport(_configuration)
            .Execute(true, true, false, _session.Connection, Console.Out);


IDataBaseSchema dbMeta = new SQLiteDataBaseMetaData((DbConnection) _session.Connection);
ITableMetadata tbMeta = dbMeta.GetTableMetadata(//where do I get the datarow this method needs?, and what are the extras args?);

如何正确使用此方法?

1 个答案:

答案 0 :(得分:1)

我建议您验证您的映射和数据库架构是否同步(参见SchemaValidator);应该这样做。

相关问题