I am building an app with ASP.NET MVC2, Fluent NHibernate, StructureMap, and PostgreSQL. I am a total newbie when it comes to Fluent NHibernate. I got a setup going from a couple different sources but when I build and run my app it doesnt create the database tables for the database in my connection string. I have code in a few different files so Im not sure which code I need to post of if I should post all of it. If there is one key to check for please let me know or let me know to post all the code. Thanks!
相关问题
- MVC-Routing,Why i can not ignore defaults,The matc
- Django distinct is not working
- PostgreSQL: left outer join syntax
- parameters in routing do not work MVC 3
- Connecting Python to a Heroku PostgreSQL DB?
相关文章
- postgresql 关于使用between and 中是字符串的问题
- postgresql 月份差计算问题
- Using boolean expression in order by clause
- Table valued Parameter Equivalent in Postgresql
- in redshift postgresql can I skip columns with the
- Oracle equivalent of PostgreSQL INSERT…RETURNING *
- Fluent NHibernate — Saving Entity with Composite K
- How to get a list of connected clients on SignalR
You can use the
SchemaExport
class from NHibernate Core to export your schema to a database.To execute the schema export, use the
ExposeConfiguration
method in the Fluent NHibernate database configuration API.There's also a
SchemaUpdate
class available which does not drop and recreate your schema but updates the existing schema. This is useful if you would like to preserve the data in the database.SchemaExport
andSchemaUpdate
are available in theNHibernate.Tool.hbm2ddl
namespace.The FluentNhiberante SessionSource object exposes the CreateSchema.