Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dbConnectionFactory"></param>
        /// <param name="concurrencyMode">是否支持读写并发安全</param>
        public SQLiteContext(IDbConnectionFactory dbConnectionFactory, bool concurrencyMode)
        {
            PublicHelper.CheckNull(dbConnectionFactory);

            if (concurrencyMode == true)
            {
                dbConnectionFactory = new ConcurrentDbConnectionFactory(dbConnectionFactory);
            }

            this._databaseProvider = new DatabaseProvider(dbConnectionFactory);
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dbConnectionFactory"></param>
        /// <param name="concurrencyMode">是否支持读写并发安全</param>
        public SQLiteContext(IDbConnectionFactory dbConnectionFactory, bool concurrencyMode)
        {
            Utils.CheckNull(dbConnectionFactory);

            if (concurrencyMode == true)
            {
                dbConnectionFactory = new ConcurrentDbConnectionFactory(dbConnectionFactory);
            }

            this._dbContextServiceProvider = new DbContextServiceProvider(dbConnectionFactory);
        }