public IDataSet CreateDataSet(ISetCollection context, Type entityType) { var result = _cacheData.GetOrAdd( entityType, t => (Func <ISetCollection, IDataSet>)_genericCreateData.MakeGenericMethod(t).Invoke(null, null))(context); return(result as IDataSet); }
public virtual ICacheSet Create(ISetCollection context, Type entityType) { var result = _cache.GetOrAdd( entityType, t => (Func <ISetCollection, ICacheSet>)_genericCreate.MakeGenericMethod(t).Invoke(null, null))(context); return(result as ICacheSet); }
/// <inheritdoc /> public InternalCacheSet([NotNull] ISetCollection context) { _context = context; _dictionary = new ConcurrentDictionary <string, T>(); _list = new HashSet <T>(); _constructor = typeof(T).GetConstructor(new Type[] { }); _mergeLock = new object(); _cacheMap = RedisCacher.GetCacheMap <T>(); _cachingService = new CachingPersistеnceService(_context); }
public InternalDataSet(ISetCollection context) { }
public CachingPersistеnceService(ISetCollection ctx) { _context = ctx; _cacher = ctx.Database; _rand = new Random(); }