Пример #1
0
        /// <summary>
        /// Creates a new instance of <see cref="LiteDBRepository"/> attached to the given context
        /// </summary>
        public LiteDBRepository(ILiteDBContext dbContext, String collectionName)
        {
            Contract.Requires(dbContext != null);
            Contract.Requires(!String.IsNullOrEmpty(collectionName));

            _collection = dbContext.Database.GetCollection <TEntity>(collectionName);
        }
        /// <summary>
        /// Creates a new instance of <see cref="LiteDBStorageRepository"/> attached to the given context
        /// </summary>
        /// <remarks>Limit per file is 2 GB</remarks>
        public LiteDBStorageRepository(ILiteDBContext dbContext)
        {
            Contract.Requires(dbContext != null);

            _fileStorage = dbContext.Database.FileStorage;
        }
Пример #3
0
 public LiteDBStorageRepository(ILiteDBContext dbContext)
 {
     DbContext = dbContext;
 }
Пример #4
0
 public LiteDBRepository(ILiteDBContext liteDBContext, MemoryCacheService memoryCache)
 {
     this.DbContext = liteDBContext;
     MemoryCache    = memoryCache;
     groupCacheKey  = typeof(TEntity).FullName;
 }
Пример #5
0
 public BaseRepository(ILiteDBContext dBContext)
 {
     _dBContext = dBContext;
 }
Пример #6
0
 public LiteDBServices(ILiteDBContext context)
 {
     _context = context;
 }