Example #1
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();
            }
        }
Example #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 FileContextValueGeneratorSelector([NotNull] ValueGeneratorSelectorDependencies dependencies, IFileContextStoreCache _storeCache, FileContextIntegerValueGeneratorCache _idCache, IDbContextOptions contextOptions)
     : base(dependencies)
 {
     _fileContextFactory = new FileContextIntegerValueGeneratorFactory(_storeCache, _idCache, contextOptions);
 }
 public FileContextIntegerValueGeneratorFactory(IFileContextStoreCache _storeCache, FileContextIntegerValueGeneratorCache _idCache, IDbContextOptions _contextOptions)
 {
     storeCache = _storeCache;
     idCache    = _idCache;
     options    = _contextOptions.Extensions.OfType <FileContextOptionsExtension>().First();
 }