Skip to content

Instantly share code, notes, and snippets.

@samdelagarza
Created March 25, 2010 13:33
Show Gist options
  • Save samdelagarza/343555 to your computer and use it in GitHub Desktop.
Save samdelagarza/343555 to your computer and use it in GitHub Desktop.
Fluently.Configure().Database(MsSqlConfiguration.MsSql2008
.ConnectionString(c => c
.Server(@"localhost\SQLEXPRESS")
.Database("foo")
.Username("foo")
.Password("foo")))
.Mappings(m =>
m.FluentMappings.AddFromAssemblyOf<FooMap>()
.Conventions.Add(FluentNHibernate.Conventions.Helpers.Table.Is(x => "foos"))
)
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<BarMap>()
.Conventions.Add(FluentNHibernate.Conventions.Helpers.Table.Is(x => "bars"))
.BuildSessionFactory();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment