/// <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 InMemoryQueryContextFactory( [NotNull] QueryContextDependencies dependencies, [NotNull] IInMemoryStoreSource storeSource, [NotNull] IDbContextOptions contextOptions) : base(dependencies) { _store = storeSource.GetStore(contextOptions); }
/// <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 IInMemoryStore GetStore([NotNull] this IInMemoryStoreSource storeSource, [NotNull] IDbContextOptions options) { var storeName = options.Extensions.OfType <InMemoryOptionsExtension>().FirstOrDefault()?.StoreName; return(storeName == null ? storeSource.GetTransientStore() : storeSource.GetPersistentStore(storeName)); }
/// <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 InMemoryQueryContextFactory( [NotNull] ICurrentDbContext currentContext, [NotNull] IConcurrencyDetector concurrencyDetector, [NotNull] IInMemoryStoreSource storeSource, [NotNull] IDbContextOptions contextOptions) : base(currentContext, concurrencyDetector) { _store = storeSource.GetStore(contextOptions); }
public InMemoryQueryContextFactory( [NotNull] IStateManager stateManager, [NotNull] IConcurrencyDetector concurrencyDetector, [NotNull] IInMemoryStoreSource storeSource, [NotNull] IChangeDetector changeDetector, [NotNull] IDbContextOptions contextOptions) : base(stateManager, concurrencyDetector, changeDetector) { _store = storeSource.GetStore(contextOptions); }
/// <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 InMemoryDatabase( [NotNull] DatabaseDependencies dependencies, [NotNull] IInMemoryStoreSource storeSource, [NotNull] IDbContextOptions options, [NotNull] IInterceptingLogger <LoggerCategory.Update> updateLogger) : base(dependencies) { Check.NotNull(storeSource, nameof(storeSource)); Check.NotNull(options, nameof(options)); Check.NotNull(updateLogger, nameof(updateLogger)); _store = storeSource.GetStore(options); _updateLogger = updateLogger; }
/// <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 InMemoryDatabase( [NotNull] DatabaseDependencies dependencies, [NotNull] IInMemoryStoreSource storeSource, [NotNull] IDbContextOptions options, [NotNull] ILogger <InMemoryDatabase> logger) : base(dependencies) { Check.NotNull(storeSource, nameof(storeSource)); Check.NotNull(options, nameof(options)); Check.NotNull(logger, nameof(logger)); _store = storeSource.GetStore(options); _logger = logger; }
/// <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 InMemoryDatabase( [NotNull] IQueryCompilationContextFactory queryCompilationContextFactory, [NotNull] IInMemoryStoreSource storeSource, [NotNull] IDbContextOptions options, [NotNull] ILogger <InMemoryDatabase> logger) : base(queryCompilationContextFactory) { Check.NotNull(queryCompilationContextFactory, nameof(queryCompilationContextFactory)); Check.NotNull(storeSource, nameof(storeSource)); Check.NotNull(options, nameof(options)); Check.NotNull(logger, nameof(logger)); _store = storeSource.GetStore(options); _logger = logger; }
/// <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 IInMemoryStore GetGlobalStore([NotNull] this IInMemoryStoreSource storeSource) => storeSource.GetNamedStore(null);
/// <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 IInMemoryStore GetStore([NotNull] this IInMemoryStoreSource storeSource, [NotNull] IDbContextOptions options) => storeSource.GetNamedStore(options.Extensions.OfType <InMemoryOptionsExtension>().FirstOrDefault()?.StoreName);