public NHibernateEventStoreTransaction(ISessionFactory sf) { this.SessionFactory = sf; this.Session = sf.OpenSession(); WebSessionContext.Bind(this.Session);; }
public void SetUp() { if (this._sessionFactory == null) { var cfg = new Configuration(); cfg.Configure(); this._sessionFactory = cfg.BuildSessionFactory(); } }
public void OnStartUp() { SetRootPathProject(); XmlTextReader configReader = new XmlTextReader(new MemoryStream(NHibernate.Test.Properties.Resources.Configuration)); DirectoryInfo dir = new DirectoryInfo(this.rootPathProject + ".Hbm"); Console.WriteLine(dir); builder = new NhConfigurationBuilder(configReader, dir); builder.SetProperty("connection.connection_string", GetConnectionString()); try { builder.BuildSessionFactory(); sessionFactory = builder.SessionFactory; } catch (Exception ex) { Console.WriteLine(ex); throw; } sessionProvider = new SessionManager(sessionFactory); currentPagedDAO = new EnterprisePagedDAO(sessionProvider); currentRootPagedDAO = new EnterpriseRootDAO<object>(sessionProvider); currentSession = sessionFactory.OpenSession(); }
public static bool IsDynamicComponentDictionaryGetter(MethodInfo method, Expression targetObject, IEnumerable<Expression> arguments, ISessionFactory sessionFactory, out string memberName) { memberName = null; // A dynamic component must be an IDictionary with a string key. if (method.Name != "get_Item" || !typeof(IDictionary).IsAssignableFrom(targetObject.Type)) return false; var key = arguments.First() as ConstantExpression; if (key == null || key.Type != typeof(string)) return false; // The potential member name memberName = (string)key.Value; // Need the owning member (the dictionary). var member = targetObject as MemberExpression; if (member == null) return false; var metaData = sessionFactory.GetClassMetadata(member.Expression.Type); if (metaData == null) return false; // IDictionary can be mapped as collection or component - is it mapped as a component? var propertyType = metaData.GetPropertyType(member.Member.Name); return (propertyType != null && propertyType.IsComponentType); }
public VartotojaiController(IAuthenticationProvider authenticationProvider, ISessionFactory sessionFactory, [LoggedIn] UserInformation loggedInUser, HashAlgorithm hashAlgorithm) { _authenticationProvider = authenticationProvider; _sessionFactory = sessionFactory; _loggedInUser = loggedInUser; _hashAlgorithm = hashAlgorithm; }
public void Close() { if(_sessionFactory != null) _sessionFactory.Dispose(); _sessionFactory = null; }
private static void Init() { nhConfiguration = new Configuration(); //nhConfiguration.Configure("NhibernateUtils/NHibernate.cfg.xml"); nhConfiguration.AddAssembly("Activos"); sessionFactory = nhConfiguration.BuildSessionFactory(); }
private static void InitNHibernate() { lock (LockObject) { if (_sessionFactory == null) { // Создание NHibernate-конфигурации приложения на основании описаний из web.config. // После этого вызова, в том числе, из сборки будут извлечены настройки маппинга, // заданные в xml-файлах. var configure = new Configuration().Configure(); // Настройка маппинга, созданного при помощи mapping-by-code var mapper = new ModelMapper(); mapper.AddMappings(new List<Type> { // Перечень классов, описывающих маппинг typeof (DocumentTypeMap), typeof (DocumentMap), typeof (DocumentWithVersionMap), }); // Добавление маппинга, созданного при помощи mapping-by-code, // в NHibernate-конфигурацию приложения configure.AddDeserializedMapping(mapper.CompileMappingForAllExplicitlyAddedEntities(), null); //configure.LinqToHqlGeneratorsRegistry<CompareValuesGeneratorsRegistry>(); //configure.LinqToHqlGeneratorsRegistry<InGeneratorRegistry>(); configure.DataBaseIntegration(x => { x.LogSqlInConsole = true; x.LogFormattedSql = true; }); _sessionFactory = configure.BuildSessionFactory(); } } }
public ISession Open() { if(_sessionFactory == null) _sessionFactory = configureSessionFactory(); return _sessionFactory.OpenSession(); }
private static void GenerateData(ISessionFactory factory, Type entityClass, IGeometryCreator creator) { using (ISession session = factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { try { for (int i = 0; i < GeneratedRowsPerEntityCount; i++) { IGeometry geom = creator.Create(); geom.SRID = 4326; object entity = Activator.CreateInstance(entityClass, i, "feature " + i, geom); session.Save(entity); } } catch (Exception e) { throw new ApplicationException("Failed loading data of type " + entityClass.Name, e); } tx.Commit(); } } }
public void DestroySagaPersisterContext() { SagaPersister = null; SessionFactory.Dispose(); SessionFactory = null; DeleteFile(); }
static OracleSessionFactoryHelper() { var cfg = new Configuration(); cfg.SessionFactory() .Proxy .DisableValidation() .Through<NHibernate.Bytecode.DefaultProxyFactoryFactory>() .Named("Fluent.SessionFactory") .GenerateStatistics() .Using(EntityMode.Poco) .ParsingHqlThrough<NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory>() .Integrate .Using<Oracle10gDialect>() .AutoQuoteKeywords() .LogSqlInConsole() .EnableLogFormattedSql() .Connected .Through<DriverConnectionProvider>() .By<OracleDataClientDriver>() .ByAppConfing("ConnectionString") .CreateCommands .Preparing() .WithTimeout(10) .AutoCommentingSql() .WithMaximumDepthOfOuterJoinFetching(11) .WithHqlToSqlSubstitutions("true 1, false 0, yes 'Y', no 'N'"); SessionFactory = FluentNHibernate.Cfg.Fluently.Configure(cfg) .Database(OracleDataClientConfiguration.Oracle10.ShowSql()) .Mappings(m => GetMappingsAssemblies().ToList() .ForEach(o => m.FluentMappings.AddFromAssembly(o))).BuildSessionFactory(); }
public static void TestClassSetup(TestContext context) { _configuration = new Configuration(); _configuration.Configure(); _configuration.AddAssembly(typeof(Draft).Assembly); _sessionFactory = _configuration.BuildSessionFactory(); }
public SetModificationDateIntegrationTests() { listener = new SetModificationTimeFlushEntityEventListener() { CurrentDateTimeProvider = () => defaultDate }; Configuration config = null; sessionFactory = Fluently.Configure() .Database(SQLiteConfiguration.Standard.InMemory) .Mappings(m => { m.FluentMappings.Add<ThingMap>(); m.FluentMappings.Add<InheritedThingMap>(); m.FluentMappings.Add<RelatedThingMap>(); }) .ExposeConfiguration(cfg => { listener.Register(cfg); config = cfg; }) .BuildSessionFactory(); session = sessionFactory.OpenSession(); using (var tx = session.BeginTransaction()) { new SchemaExport(config).Execute(false, true, false, session.Connection, null); tx.Commit(); } session.BeginTransaction(); }
public ExampleFactoryManager(string configSectionName = "ExampleDatabaseConnectionSettings") { var configuration = Fluently.Configure(); configuration.InitializeFromConfigMsSql(configSectionName); configuration.AddMappingsFromAssemblyOf<UserMap>(); _instance = configuration.BuildSessionFactory(); }
public UnitOfWork(ISessionFactory sessionFactory) { _sessionFactory = sessionFactory; Session = _sessionFactory.OpenSession(); Session.FlushMode = FlushMode.Auto; _transaction = Session.BeginTransaction(IsolationLevel.ReadCommitted); }
public void TestFixtureSetUp() { _configuration = new Configuration(); _configuration.Configure(); _configuration.AddAssembly(typeof(Product).Assembly); _sessionFactory = _configuration.BuildSessionFactory(); }
public void Setup() { _databaseFileName = Path.GetTempFileName(); _sessionFactory = DataUtility.CreateSessionFactory(_databaseFileName); _tempFolder = Path.GetTempFileName(); File.Delete(_tempFolder); var appDataFolder = AppDataFolderTests.CreateAppDataFolder(_tempFolder); var builder = new ContainerBuilder(); _session = _sessionFactory.OpenSession(); builder.RegisterInstance(appDataFolder).As<IAppDataFolder>(); builder.RegisterType<SqlCeDataServicesProvider>().As<IDataServicesProvider>(); builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>(); builder.RegisterType<StubReportsCoordinator>().As<IReportsCoordinator>(); builder.RegisterType<DefaultDataMigrationInterpreter>().As<IDataMigrationInterpreter>(); builder.RegisterType<SqlCeCommandInterpreter>().As<ICommandInterpreter>(); builder.RegisterType<SessionConfigurationCache>().As<ISessionConfigurationCache>(); builder.RegisterType<SessionFactoryHolder>().As<ISessionFactoryHolder>(); builder.RegisterType<DefaultDatabaseCacheConfiguration>().As<IDatabaseCacheConfiguration>(); builder.RegisterType<StubHostEnvironment>().As<IHostEnvironment>(); builder.RegisterInstance(new TestTransactionManager(_session)).As<ITransactionManager>(); builder.RegisterInstance(new ShellBlueprint { Records = Enumerable.Empty<RecordBlueprint>() }).As<ShellBlueprint>(); builder.RegisterInstance(new ShellSettings { Name = "temp", DataProvider = "SqlCe", DataTablePrefix = "TEST" }).As<ShellSettings>(); builder.RegisterModule(new DataModule()); _container = builder.Build(); _interpreter = _container.Resolve<IDataMigrationInterpreter>() as DefaultDataMigrationInterpreter; _schemaBuilder = new SchemaBuilder(_interpreter); }
public DefaultSessionProvider(ISessionFactory sessionFactory) { if (sessionFactory == null) throw new ArgumentNullException("sessionFactory"); this.sessionFactory = sessionFactory; }
/// <summary> /// Constructor /// </summary> /// <param name="assemblyNames">The names of the assemblies containing object-relational mapping information</param> /// <exception cref="Exception">Thrown if an error occurred while constructing the factory</exception> public ReaderFactory(IEnumerable<string> assemblyNames) { Exception exception = null; // If SessionFactory build fails then retry for (int tryNumber = 1; tryNumber <= 3; tryNumber++) { try { Configuration config = new Configuration(); // Add assemblies containing mapping definitions foreach (string assemblyName in assemblyNames) { config.AddAssembly(assemblyName); } config.Configure(); sessionFactory = config.BuildSessionFactory(); // SessionFactory built successfully exception = null; break; } catch (Exception ex) { exception = ex; } } if (exception != null) { throw new FingertipsException("Could not construct ReaderFactory instance", exception); } }
public static ISessionFactory GetSessionFactory() { if (_isf != null) return _isf; var cfg = new StoreConfiguration(); var sessionFactory = Fluently.Configure() .Database(MsSqlConfiguration.MsSql2008.ShowSql().ConnectionString( "Server=localhost; Database=Test; Trusted_Connection=true; MultipleActiveResultSets=true") ) .Cache(c => c.ProviderClass(typeof(NHibernate.Caches.Redis.RedisProvider).AssemblyQualifiedName) .UseQueryCache().UseSecondLevelCache()) .Mappings(m => m.AutoMappings .Add(AutoMap.AssemblyOf<Person>(cfg) .Conventions.Add<ReferenceConvention>() .Conventions.Add<HasManyConvention>() .Override<Country>(x => x.HasMany(y => y.NaturalBorns).KeyColumn("CountryBorned_CountryId")) ) ) .BuildSessionFactory(); _isf = sessionFactory; return _isf; }
public static void Update(ISessionFactory sessionFactory) { var factory = (ISessionFactoryImplementor) sessionFactory; var dialect = factory.Dialect; var connectionHelper = new SuppliedConnectionProviderConnectionHelper(factory.ConnectionProvider); factory.Dialect.Keywords.AddAll(GetReservedWords(dialect, connectionHelper)); }
public ActionTransactionHelper( ISessionFactory sessionFactory, ICurrentSessionContextAdapter currentSessionContextAdapter) { _sessionFactory = sessionFactory; _currentSessionContextAdapter = currentSessionContextAdapter; }
public static void UseNHibernate(this AppConfigurator configurator, ISessionFactory sessionFactory) { var runtime = configurator.AppRuntime; runtime.Container.Register<IDomainDbSession>(_ => new NhDomainDbSession(sessionFactory.OpenSession())); runtime.Container.Register<IDomainRepository>(_ => new NhDomainRepository(_.Resolve<IDomainDbSession>(), _.Resolve<IRelayWorker>())); }
private static void CreateSessionFactory() { // FluentNHibernate.Search Configuration Configuration fnhscfg = FluentSearch.Configure() .DefaultAnalyzer().Standard() .DirectoryProvider().RAMDirectory() .IndexingStrategy().Event() .Listeners(ListenerConfiguration.Default) .MappingClass<SearchMap>() .BuildConfiguration(); // FluentNHibernate Configuration Configuration fnhcfg = Fluently.Configure(fnhscfg) .Database(SQLiteConfiguration.Standard.InMemory() .Dialect<SQLiteDialect>() .ConnectionString(ConnectionString) .ProxyFactoryFactory<ProxyFactoryFactory>()) .Mappings(m => m.FluentMappings.AddFromAssemblyOf<AuthorMap>()) .ExposeConfiguration(cfg => { cfg.SetListeners(ListenerType.PostInsert, new[] { new FullTextIndexEventListener() }); cfg.SetListeners(ListenerType.PostUpdate, new[] { new FullTextIndexEventListener() }); cfg.SetListeners(ListenerType.PostDelete, new[] { new FullTextIndexEventListener() }); cfg.SetListener(ListenerType.PostCollectionRecreate, new FullTextIndexCollectionEventListener()); cfg.SetListener(ListenerType.PostCollectionRemove, new FullTextIndexCollectionEventListener()); cfg.SetListener(ListenerType.PostCollectionUpdate, new FullTextIndexCollectionEventListener()); }) .BuildConfiguration(); _cfg = fnhcfg; _sessionFactory = _cfg.BuildSessionFactory(); }
private static void Init() { var config = new Configuration(); config.Configure(); config.AddAssembly(Assembly.GetCallingAssembly()); _sessionFactory = config.BuildSessionFactory(); }
/// <summary> /// Called by the framework to initialize the persistent store. /// </summary> public void Initialize() { Platform.Log(LogLevel.Info, "Initializing NHibernate subsystem..."); // create the hibernate configuration _cfg = new Configuration(); // this will automatically read from the app.config _cfg.Configure(); Platform.Log(LogLevel.Debug, "NHibernate connection string: {0}", this.ConnectionString); // add each assembly to the hibernate configuration // this tells NHibernate to look for .hbm.xml embedded resources in these assemblies // TODO: we should only scan plugins that are tied to this PersistentStore, but there is currently no way to know this var orderer = new AssembliesHbmOrderer(Platform.PluginManager.Plugins); orderer.AddToConfiguration(_cfg); // setup default caching strategies for all classes/collections that don't have one explicitly // specified in the mapping files CreateDefaultCacheStrategies(); // create the session factory _sessionFactory = _cfg.BuildSessionFactory(); Platform.Log(LogLevel.Info, "NHibernate initialization complete."); }
public void Setup() { Configure.ConfigurationSource = new DefaultConfigurationSource(); NHibernateSettingRetriever.AppSettings = () => new NameValueCollection { {"NServiceBus/Persistence/NHibernate/dialect", dialect} }; NHibernateSettingRetriever.ConnectionStrings = () => new ConnectionStringSettingsCollection { new ConnectionStringSettings("NServiceBus/Persistence/NHibernate/Timeout", connectionString) }; ConfigureNHibernate.Init(); Configure.With(Enumerable.Empty<Type>()) .DefineEndpointName("Foo") .DefaultBuilder() .UseNHibernateTimeoutPersister(); persister = Configure.Instance.Builder.Build<TimeoutStorage>(); sessionFactory = persister.SessionFactory; new Installer.Installer().Install(WindowsIdentity.GetCurrent().Name); }
public static ISession OpenSession() { if (sessionFactory == null) { System.Collections.Specialized.NameValueCollection sets = System.Configuration.ConfigurationManager.AppSettings; //获取连接字符串 string server = Utilities.GetConfigValue("server"); string pwd = VTMS.Common.Utilities.Base64Dencrypt(Utilities.GetConfigValue("DBPassword")); string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ToString(); connectionString = string.Format(connectionString, server, pwd); try { Configuration cfg = new Configuration().Configure(); cfg.Proxy(p => p.ProxyFactoryFactory<NHibernate.Bytecode.DefaultProxyFactoryFactory>()); cfg.DataBaseIntegration(db => { db.ConnectionString = connectionString; }); sessionFactory = cfg.BuildSessionFactory(); } catch (Exception e) { VTMS.Common.MessageUtil.ShowError("无法登陆服务器,请检查服务器IP设置是否正确,错误信息为:" + e.Message); } } return sessionFactory.OpenSession(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); var connectionMultiplexer = ConnectionMultiplexer.Connect("localhost:6379,allowAdmin=true"); connectionMultiplexer.GetServer("localhost", 6379).FlushAllDatabases(); RedisCacheProvider.SetConnectionMultiplexer(connectionMultiplexer); RedisCacheProvider.SetOptions(new RedisCacheProviderOptions() { Serializer = new NetDataContractCacheSerializer() }); var dbFile = HttpContext.Current.Server.MapPath("~/App_Data/sample.db"); if (File.Exists(dbFile)) { File.Delete(dbFile); } var configuration = Fluently.Configure() .Database( SQLiteConfiguration.Standard.UsingFile(dbFile) ) .Mappings(m => m.FluentMappings.Add(typeof(BlogPostMapping))) .ExposeConfiguration(cfg => cfg.SetProperty(Cfg.Environment.GenerateStatistics, "true")) .Cache(c => c.UseQueryCache().UseSecondLevelCache().ProviderClass<RedisCacheProvider>()) .BuildConfiguration(); new SchemaExport(configuration).Create(false, true); SessionFactory = configuration.BuildSessionFactory(); }
public AddMuteEventCommandHandler(ISessionFactory sessionFactory) { this._sessionFactory = sessionFactory; }
public NHibernateSynchronizedStorageAdapter(ISessionFactory sessionFactory) { this.sessionFactory = sessionFactory; }
private static TimeSpan RefreshUtcOffset(ISessionFactory sessionWrapper, ProviderTypeEnum providerType) { lock (DateOffsetMutex) { Func <object, DateTime> conversionFunc = a => (DateTime)a; using (var session = sessionWrapper.OpenStatelessSession()) { IQuery query; switch (providerType == ProviderTypeEnum.None ? sessionWrapper.DeriveProviderType() : providerType) { case ProviderTypeEnum.OracleClient10Managed: case ProviderTypeEnum.OracleClient9Managed: case ProviderTypeEnum.OracleClient10: case ProviderTypeEnum.OracleClient9: query = session.CreateSQLQuery("select systimestamp at time zone 'UTC' from dual"); break; case ProviderTypeEnum.PostgreSQLStandard: case ProviderTypeEnum.PostgreSQL81: case ProviderTypeEnum.PostgreSQL82: query = session.CreateSQLQuery("SELECT NOW() at time zone 'utc'"); break; case ProviderTypeEnum.MySQL: query = session.CreateSQLQuery("select utc_timestamp()"); break; case ProviderTypeEnum.SQLite: query = session.CreateSQLQuery("select datetime('now')"); break; case ProviderTypeEnum.DB2Informix1150: query = session.CreateSQLQuery("select dbinfo('utc_current')"); conversionFunc = o => { var seconds = Convert.ToInt32(o); return(new DateTime(1970, 1, 1).AddSeconds(seconds)); }; break; case ProviderTypeEnum.SQLAnywhere10: case ProviderTypeEnum.SQLAnywhere9: case ProviderTypeEnum.SQLAnywhere11: case ProviderTypeEnum.SQLAnywhere12: query = session.CreateSQLQuery("select CURRENT UTC TIMESTAMP"); break; case ProviderTypeEnum.MsSql2000: case ProviderTypeEnum.MsSql2005: case ProviderTypeEnum.MsSql2008: case ProviderTypeEnum.MsSql2012: case ProviderTypeEnum.JetDriver: query = session.CreateSQLQuery("select getutcdate()"); break; case ProviderTypeEnum.DB2Standard: query = session.CreateSQLQuery("select CURRENT TIMESTAMP - CURRENT TIME ZONE"); break; case ProviderTypeEnum.Firebird: case ProviderTypeEnum.MsSqlCe40: default: throw new NotImplementedException( string.Format("This feature is not supported for provider {0}", providerType == ProviderTypeEnum.None ? sessionWrapper.DeriveProviderType() : providerType)); } var stopwatch = new Stopwatch(); var current = DateTime.UtcNow; stopwatch.Start(); var serverUtc = conversionFunc(query.UniqueResult()); stopwatch.Stop(); return(serverUtc.Subtract(current).Subtract(stopwatch.Elapsed)); } } }
public LoginRepository(ISessionFactory sessionFactory) : base(sessionFactory) { this.sessionFactory = sessionFactory; }
///<summary> /// ctor ///</summary> ///<param name="sessionFactory"> </param> public NHibernateUnitOfWorkFactory(ISessionFactory sessionFactory) { _sessionSessionFactory = sessionFactory; }
public NHibernateUnitOfWork(ISessionFactory sessionFactory) { _sessionFactory = sessionFactory; _session = _sessionFactory.OpenSession(); _transaction = _session.BeginTransaction(); }
public static void Init(string connectionString) { _factory = BuildSessionFactory(connectionString); }
public UserRepository(ISessionFactory factory) : base(factory) { }
public CategoriesListItemsQueryHandler(IMapper mapper, ISessionFactory factory) : base(mapper, factory) { }
public MarkMuteEventAsUnmutedCommandHandler(ISessionFactory sessionFactory) { this._sessionFactory = sessionFactory; }
public FamilyDao(ISessionFactory factory) : base(factory) { }
/// <summary> /// Initializes a new instance of the <see cref="ValidatorGenderConformityMiddleName"/> class. /// </summary> /// <param name="sessionFactory"> /// The session factory. /// </param> public ValidatorGenderConformityMiddleName(ISessionFactory sessionFactory) : base(CheckLevelEnum.Complex, sessionFactory, x => x.InsuredPersonData.Gender.Id) { }
public static bool IsDynamicComponentDictionaryGetter(MethodCallExpression expression, ISessionFactory sessionFactory, out string memberName) { return(IsDynamicComponentDictionaryGetter(expression.Method, expression.Object, expression.Arguments, sessionFactory, out memberName)); }
public AdminService(ISessionFactory sessionFactory, IUserPermissionContext permissionContext, IEntryLinkFactory entryLinkFactory) : base(sessionFactory, permissionContext, entryLinkFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="ValidatorTemporaryCertificateNumberExists"/> class. /// </summary> /// <param name="sessionFactory"> /// The session factory. /// </param> public ValidatorTemporaryCertificateNumberExists(ISessionFactory sessionFactory) : base(CheckLevelEnum.Complex, sessionFactory) { }
public static bool IsDynamicComponentDictionaryGetter(MethodCallExpression expression, ISessionFactory sessionFactory) { string memberName; return(IsDynamicComponentDictionaryGetter(expression, sessionFactory, out memberName)); }
public NHibernateSagaRepository(ISessionFactory sessionFactory) { _sessionFactory = sessionFactory; _insertIsolationLevel = System.Data.IsolationLevel.ReadCommitted; }
public static bool IsDynamicComponentDictionaryGetter(MethodInfo method, Expression targetObject, IEnumerable <Expression> arguments, ISessionFactory sessionFactory, out string memberName) { memberName = null; // A dynamic component must be an IDictionary with a string key. if (method.Name != "get_Item" || !typeof(IDictionary).IsAssignableFrom(targetObject.Type)) { return(false); } var key = arguments.First() as ConstantExpression; if (key == null || key.Type != typeof(string)) { return(false); } // The potential member name memberName = (string)key.Value; // Need the owning member (the dictionary). var member = targetObject as MemberExpression; if (member == null) { return(false); } var metaData = sessionFactory.GetClassMetadata(member.Expression.Type); if (metaData == null) { return(false); } // IDictionary can be mapped as collection or component - is it mapped as a component? var propertyType = metaData.GetPropertyType(member.Member.Name); return(propertyType != null && propertyType.IsComponentType); }
public virtual bool HasBind(ISessionFactory sessionFactory) { return(CurrentSessionContext.HasBind(sessionFactory)); }
public NHibernateSagaRepository(ISessionFactory sessionFactory, System.Data.IsolationLevel isolationLevel) { _sessionFactory = sessionFactory; _insertIsolationLevel = isolationLevel; }
public static ISession GetCurrentSession(ISessionFactory sessionFactory) { return(sessionFactory.GetCurrentSession()); }
public virtual ISession Unbind(ISessionFactory sessionFactory) { return(CurrentSessionContext.Unbind(sessionFactory)); }
public CommonObjectDataEngine(ISessionFactory sf) { this.SessionFactory = sf; }
public NHibernateUserAuthRepository(ISessionFactory sessionFactory) { this.sessionFactory = sessionFactory; }
protected AbstractRepository(ISessionFactory sessionFactory) { SessionFactory = sessionFactory; }
public DatabaseDataEngine(ISessionFactory sf) { this.SessionFactory = sf; }
public InMemorySqLiteSessionFactory() { _sessionFactory = CreateSessionFactory(); Session = _sessionFactory.OpenSession(); ExportSchema(); }
public FinanceRepository(ISessionFactory sessionFactory) { _sessionFactory = sessionFactory; }
public TestData(ISessionFactory sessions) { this.sessions = sessions; }
public ClientsRepository(ISessionFactory sessionFactory) : base(sessionFactory) { //... }