コード例 #1
0
        public override ICacheClient CreateClient()
        {
            var cache = new OrmLiteCacheClient
            {
                DbFactory = new OrmLiteConnectionFactory(
                    ":memory:", SqliteDialect.Provider)
            };
            cache.InitSchema();

            return cache;
        }
コード例 #2
0
        public override ICacheClient CreateClient()
        {
            var cache = new OrmLiteCacheClient
            {
                DbFactory = new OrmLiteConnectionFactory(
                    ":memory:", SqliteDialect.Provider)
            };

            cache.InitSchema();

            return(cache);
        }
コード例 #3
0
        public override ICacheClient CreateClient()
        {
            var cache = new OrmLiteCacheClient
            {
                DbFactory = new OrmLiteConnectionFactory(
                    Config.SqlServerBuildDb, SqlServerDialect.Provider)
            };

            using (var db = cache.DbFactory.Open())
            {
                db.DropTable <CacheEntry>();
            }

            cache.InitSchema();

            return(cache);
        }
コード例 #4
0
        public override ICacheClient CreateClient()
        {
            var cache = new OrmLiteCacheClient
            {
                DbFactory = new OrmLiteConnectionFactory(
                    Config.SqlServerBuildDb, SqlServerDialect.Provider)
            };

            using (var db = cache.DbFactory.Open())
            {
                db.DropTable<CacheEntry>();
            }

            cache.InitSchema();

            return cache;
        }
コード例 #5
0
        public override ICacheClient CreateClient()
        {
            var cache = new OrmLiteCacheClient <SqlServer2014MemoryOptimizedCacheEntry>
            {
                DbFactory = new OrmLiteConnectionFactory(
                    Config.SqlServerConnString, SqlServer2014Dialect.Provider)
            };

            using (var db = cache.DbFactory.Open())
            {
                db.DropTable <SqlServer2014MemoryOptimizedCacheEntry>();
            }

            cache.InitSchema();

            return(cache);
        }