I have recently switched over to using the Fluent Configuration
syntax. I have been using SessionSource from
FluentNHibernate.Framework when doing my tests. The constructor
requires the configuration properties from the nhibernate
configuration. Is there a nice way to get at this from the
FluentConfiguration?
Currently I am using a workaround saving the Configuration from
ExposeConfiguration():
[SetUp]
public void SetUp()
{
var bootStrapper = new MediaManagerBootstrapper();
Configuration config = null;
var sessionFactory = Fluently.Configure()
.Database(SQLiteConfiguration.Standard.InMemory)
.Mappings(m =>
m.AutoMappings.Add(bootStrapper.AutoPersistenceModel))
.ExposeConfiguration(c => { config = c; })
.BuildSessionFactory();
Session = sessionFactory.OpenSession();
var sessionSource = new SessionSource(config.Properties,
bootStrapper.AutoPersistenceModel);
sessionSource.BuildSchema(Session);
}
Any suggestions?
Nic
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" 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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---