/// <summary> /// Initializes a new instance of the <see cref="EntityFrameworkUnitOfWorkProvider"/> class. /// </summary> public EntityFrameworkUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func <string, DatabaseType, DbContext> dbContextFactory) : base(registry) { _dbContextFactory = dbContextFactory; }
public ApplicationUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func<DbContext> factory) : base(registry, factory) { }
/// <summary> /// Initializes a new instance of the <see cref="UnitOfWorkProviderBase"/> class. /// </summary> protected UnitOfWorkProviderBase(IUnitOfWorkRegistry registry) { Validations.ValidateInput(registry, nameof(registry)); _registry = registry; }
public UnitOfWorkProviderBaseStub(IUnitOfWorkRegistry registry, Func <IUnitOfWork> newUnitOfWorkFactory) : base(registry) { this.newUnitOfWorkFactory = newUnitOfWorkFactory; }
public UnitOfWorkRegistryBase(IUnitOfWorkRegistry alternateRegistry = null) { this.alternateRegistry = alternateRegistry; }
/// <summary> /// Initializes a new instance of the <see cref="UnitOfWorkProviderBase"/> class. /// </summary> protected UnitOfWorkProviderBase(IUnitOfWorkRegistry registry) { this.registry = registry; }
protected static UnitOfWorkProviderBase CreateUnitOfWorkProviderStub(IUnitOfWork newUnitOfWork, IUnitOfWorkRegistry unitOfWorkRegistry = null) { return(CreateUnitOfWorkProviderStub(() => newUnitOfWork, unitOfWorkRegistry)); }
public ApplicationUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func <DbContext> factory) : base(registry, factory) { }
public AppEntityFrameworkUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func <MtgDbContext> dbContextFactory) : base(registry, dbContextFactory) { }
public AspNetCoreUnitOfWorkRegistry(IHttpContextAccessor httpContextAccessor, IUnitOfWorkRegistry alternateRegistry = null) : base(alternateRegistry) { this.httpContextAccessor = httpContextAccessor; }
protected AUnitOfWorkFactory(IUnitOfWorkRegistry registry) { _registry = registry; }
/// <summary> /// Initializes a new instance of the <see cref="EntityFrameworkUnitOfWorkProvider"/> class. /// </summary> protected EntityFrameworkUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func <DbContext> dbContextFactory) : base(registry) { this.dbContextFactory = dbContextFactory; }
public NativeUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func <string, DatabaseType, IDbConnection> connectionFactory) : base(registry) { Validations.ValidateInput(connectionFactory, nameof(connectionFactory)); _connectionFactory = connectionFactory; }
/// <summary> /// Initializes a new instance of the <see cref="TableStorageUnitOfWorkProvider"/> class. /// </summary> public TableStorageUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func <ITableStorageContext> contextFactory) : base(registry) { this.contextFactory = contextFactory; }
/// <summary> /// Initializes a new instance of the <see cref="EntityFrameworkUnitOfWorkProvider"/> class. /// </summary> public EntityFrameworkUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func<DbContext> dbContextFactory) : base(registry) { this.dbContextFactory = dbContextFactory; }
public TableStorageRepositoryTests() { uowRegistry = new ThreadLocalUnitOfWorkRegistry(); }
/// <summary> /// Initializes a new instance of the <see cref="UnitOfWorkProviderBase"/> class. /// </summary> public UnitOfWorkProviderBase(IUnitOfWorkRegistry registry) { this.registry = registry; }
/// <summary> /// Initializes a new instance of the <see cref="EntityFrameworkUnitOfWorkProvider"/> class. /// </summary> public EntityFrameworkUnitOfWorkProvider(IUnitOfWorkRegistry registry, Func <AppDbContext> dbContextFactory) : base(registry) { _dbContextFactory = dbContextFactory; }
/// <summary> /// Constructor. /// </summary> /// <param name="connectionOptions">connection options</param> /// <param name="registry">Storage for unitOfWork instances</param> public ExpenseManagerUnitOfWorkProvider(ConnectionOptions connectionOptions, IUnitOfWorkRegistry registry) : base(registry) { ConnectionOptions = connectionOptions; }
protected static UnitOfWorkProviderBase CreateUnitOfWorkProviderStub(Func <IUnitOfWork> newUnitOfWorkFactory = null, IUnitOfWorkRegistry unitOfWorkRegistry = null) { unitOfWorkRegistry = unitOfWorkRegistry ?? CreateUnitOfWorkRegistryStub(); newUnitOfWorkFactory = newUnitOfWorkFactory ?? (() => new Mock <IUnitOfWork>().Object); return(new UnitOfWorkProviderBaseStub(unitOfWorkRegistry, newUnitOfWorkFactory)); }
/// <summary> /// Alternative variant with db context factory for injecting custom Db Context (currently used for testing) /// </summary> /// <param name="dbContextFactory">db context factory</param> /// <param name="registry">Storage for unitOfWork instances</param> internal ExpenseManagerUnitOfWorkProvider(Func <DbContext> dbContextFactory, IUnitOfWorkRegistry registry) : base(registry) { DbContextFactory = dbContextFactory; }
public AppUnitOfWorkProvider( IUnitOfWorkRegistry registry, Func <PhotoBoothContext> dbContextFactory) : base(registry, dbContextFactory) { }
public EntityFrameworkUnitOfWorkFactory(IEntityFrameworkDbContextFactory dbContextFactory, IUnitOfWorkRegistry registry) : base(registry) { _dbContextFactory = dbContextFactory; }