public ISessionFactory CreateSessionFactory() { return(Fluently.Configure() .Database(_config.DBConfiguration(_connectionStr)) .Mappings(_config.MappingConfiguration()) .BuildSessionFactory()); }
public ISessionFactory CreateSessionFactoryAndGenerateSchema() { return(Fluently.Configure() .Database(_config.DBConfiguration(_connectionStr)) // .Mappings(m => m.FluentMappings.Add(typeof(TenantConditionFilter))) // .Mappings(m => m.FluentMappings.Add(typeof(OrgConditionFilter))) .Mappings(_config.MappingConfiguration()) .ExposeConfiguration(x => { _config.GenerateSchema(x); x.SetProperty("adonet.batch_size", "100"); x.SetProperty("generate_statistics", "true"); }) .BuildSessionFactory()); }