Ejemplo n.º 1
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public FileContextTable([NotNull] IPrincipalKeyValueFactory <TKey> keyValueFactory, IEntityType _entityType, FileContextIntegerValueGeneratorCache _idCache, FileContextOptionsExtension _options)
        {
            idCache          = _idCache;
            entityType       = _entityType;
            options          = _options;
            _keyValueFactory = keyValueFactory;

            _rows = Init();
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public FileContextStore([NotNull] IFileContextTableFactory tableFactory, FileContextOptionsExtension _options)
 {
     _tableFactory = tableFactory;
     options       = _options;
 }
Ejemplo n.º 3
0
 private static Func <IFileContextTable> CreateFactory <TKey>(IKey key, FileContextIntegerValueGeneratorCache idCache, FileContextOptionsExtension options)
 => () => new FileContextTable <TKey>(key.GetPrincipalKeyValueFactory <TKey>(), key.DeclaringEntityType, idCache, options);
Ejemplo n.º 4
0
        public FileContextIntegerValueGenerator(IProperty _property, IFileContextStoreCache _storeCache, FileContextIntegerValueGeneratorCache _idCache, FileContextOptionsExtension options)
        {
            property   = _property;
            storeCache = _storeCache;
            idCache    = _idCache;

            if (idCache.LastIds.ContainsKey(property.DeclaringEntityType.Name))
            {
                ComputeLast();
            }
            else
            {
                storeCache.GetStore(options).GetTables(property.DeclaringEntityType);
                ComputeLast();
            }
        }
 public FileContextIntegerValueGeneratorFactory(IFileContextStoreCache _storeCache, FileContextIntegerValueGeneratorCache _idCache, IDbContextOptions _contextOptions)
 {
     storeCache = _storeCache;
     idCache    = _idCache;
     options    = _contextOptions.Extensions.OfType <FileContextOptionsExtension>().First();
 }