CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: C#

config

223 Views
Copy Code Show/Hide Line Numbers
private static ISessionFactory CreateSessionFactory()
       {
           return Fluently.Configure()
               .Database(MsSqlConfiguration.MsSql2008
                   .ConnectionString(c => c
                        .FromConnectionStringWithKey("MyStore.Properties.Settings.StoreConnectionString"))
                        )
               .Mappings(m =>
                   m.FluentMappings
                       .AddFromAssemblyOf<Program>())
               .ExposeConfiguration(BuildSchema)
               .BuildSessionFactory();
       }
by Mikael Henriksson
  October 07, 2009 @ 11:13pm
Tags:

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate