Total Noob. I am following the posted getting started guide. I am at
the point where I test the schema generation. Here is my configuration
file:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property
name="connection.provider">NHibernate.Connection.DriverConnectionProvider</
property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</
property>
<property
name="connection.driver_class">NHibernate.Driver.SqlClientDriver</
property>
<property name="connection.connection_string">Data
Source=SQLSERVERNAME;Initial Catalog=DATABASENAME;Integrated
Security=True;</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>
And here is the tester:
Imports MyAssembly.Domain
Imports NHibernate.Cfg
Imports NHibernate.Tool.hbm2ddl
Imports NUnit.Framework
Namespace Tests
<TestFixture()> _
Public Class GenerateSchema_Fixture
<Test()> _
Public Sub Can_generate_schema()
Dim cfg = New Configuration()
cfg.Configure()
cfg.AddAssembly(GetType(Question).Assembly)
Dim exp As NHibernate.Tool.hbm2ddl.SchemaExport = New
NHibernate.Tool.hbm2ddl.SchemaExport(cfg)
exp.Execute(True, True, False)
End Sub
End Class
End Namespace
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.