public FileContextQueryContextFactory(
     [NotNull] QueryContextDependencies dependencies,
     [NotNull] IFileContextStoreCache storeCache,
     [NotNull] IDbContextOptions contextOptions)
 {
     _store        = storeCache.GetStore(contextOptions);
     _dependencies = dependencies;
 }
Пример #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 FileContextQueryContextFactory(
     [NotNull] QueryContextDependencies dependencies,
     [NotNull] IFileContextStoreCache storeCache,
     [NotNull] IDbContextOptions contextOptions)
     : base(dependencies)
 {
     _store = storeCache.GetStore(contextOptions.Extensions.OfType <FileContextOptionsExtension>().First());
 }
Пример #3
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 FileContextDatabase(
            [NotNull] DatabaseDependencies dependencies,
            [NotNull] IFileContextStoreCache storeCache,
            [NotNull] IDbContextOptions options,
            [NotNull] IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger)
            : base(dependencies)
        {
            Check.NotNull(storeCache, nameof(storeCache));
            Check.NotNull(options, nameof(options));
            Check.NotNull(updateLogger, nameof(updateLogger));

            _store        = storeCache.GetStore(options);
            _updateLogger = updateLogger;
        }
Пример #4
0
        public FileContextIntegerValueGenerator(IProperty _property, IFileContextStoreCache _storeCache)
        {
            property   = _property;
            storeCache = _storeCache;

            if (FileContextIntegerValueGeneratorFactory.LastIds.ContainsKey(property.DeclaringEntityType.Name))
            {
                ComputeLast();
            }
            else
            {
                storeCache.GetStore().GetTables(property.DeclaringEntityType);
                ComputeLast();
            }
        }
Пример #5
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 static IFileContextStore GetStore([NotNull] this IFileContextStoreCache storeCache, [NotNull] IDbContextOptions options)
 => storeCache.GetStore(options.Extensions.OfType <FileContextOptionsExtension>().First().Options);
 /// <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 static IFileContextStore GetStore([NotNull] this IFileContextStoreCache storeCache, [NotNull] IDbContextOptions options)
 => storeCache.GetStore();