public UnitOfWork(IDataContextAsync dataContext, IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; _dataContext = dataContext; _repositories = new Dictionary <string, dynamic>(); }
public RepositorySupplierOffer(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
/// <summary>Make a repository of type T.</summary> /// <typeparam name="T">Type of repository to make.</typeparam> /// <param name="dbContext"> /// The <see cref="Ef6.DataContext" /> with which to initialize the repository. /// </param> /// <param name="factory"> /// Factory with <see cref="Ef6.DataContext" /> argument. Used to make the repository. /// If null, gets factory from <see cref="_repositoryFactories" />. /// </param> /// <param name="unitOfWorkAsync"> /// The <see cref="IUnitOfWorkAsync" /> which is passed to the constructor of the <see cref="IRepository{T}" />. /// </param> /// <returns></returns> protected virtual T MakeRepository <T>(Func <IDataContextAsync, IUnitOfWorkAsync, dynamic> factory, IDataContextAsync dbContext, IUnitOfWorkAsync unitOfWorkAsync) { var repositoryFactory = factory ?? _repositoryFactories.GetRepositoryFactory <T>(); if (repositoryFactory == null) { throw new NotImplementedException("No factory for repository type, " + typeof(T).FullName); } var repository = repositoryFactory(dbContext, unitOfWorkAsync); Repositories[typeof(T)] = repository; return(repository); }
public RepositoryItemType(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
public RepositoryProcurement(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
public ComplaintRepository(IDataContextAsync context, IUnitOfWork unitOfWork) : base(context, unitOfWork) { }
public RepositoryAsync(IDataContextAsync <DbContext> dataContext, RepositoryOptions options) : base(dataContext, options) { }
public UnitOfWork(IDataContextAsync context) { _context = (FaceDetectionContext)context; }
public EntityFrameorkUnitOfWork(IDataContextAsync dataContext) { _dataContext = dataContext; _repositories = new Dictionary <string, dynamic>(); }
public EFRepositoryString(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
public UnitOfWork(IDataContextAsync context, ICurrentUser currentUser) { _context = context; _currentUser = currentUser; }
public RepositoryAsync(IDataContextAsync <DbContext> dataContext, IConfiguration configuration) : this(dataContext, new RepositoryOptions() { Configuration = configuration }) { }
public UnitOfWork(IDataContextAsync dataContext) { _dataContext = dataContext; }
public EntityRepository(IDataContextAsync context, IObjectMapper mapper) : base(context, mapper) { }
public RepositoryAsync(IDataContextAsync <DbContext> dataContext) : this(dataContext, new RepositoryOptions()) { }
public BusinessRuleBase(IDataContextAsync dataContext) : base(dataContext) { }
/// <summary> /// Initializes a new instance of the <see cref="UnitOfWork" /> class. /// </summary> /// <param name="dataContext">The data context.</param> public UnitOfWork(IDataContextAsync dataContext) { this.dataContextAsync = dataContext; this.repositories = new Dictionary <string, dynamic>(); }
public LevelRepository(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
public UnitOfWork() { this._dataContext = OMFAppContext.DataContextCreator(); this._repositories = new Dictionary <string, object>(); }
public RepositoryAttributeValue(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
public UnitOfWork(IDataContextAsync dataContext) { this._dataContext = dataContext; this._repositories = new Dictionary <string, object>(); }
/// <summary> /// Initializes a new instance of the <see cref="CategoryRepository"/> class. /// </summary> /// <param name="context"> /// The context. /// </param> /// <param name="unitOfWork"> /// The unit of work. /// </param> public CategoryRepository(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
public Repository(IDataContextAsync context) : base(context) { }
public void SetContext(IDataContextAsync DataContext) { this._dataContext = DataContext; }
public RepositoryTemplateAttribute(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
public Class1() { context = (IDataContextAsync)new docXEntities(); uow = new UnitOfWork(context); }
public HomeController() { _applicationDataContextAsync = new ApplicationDataContext("ExistingDbCodeFirstDemo"); _unitOfWork = new UnitOfWork(_applicationDataContextAsync); _existingTableRepository = new Repository <ExistingTable>(_applicationDataContextAsync, _unitOfWork); }
public Repository(IDataContextAsync context) { _context = context; _dbSet = context.Set <TEntity>(); }
/// <summary> /// Initializes a new instance of the <see cref="SupplierRepository"/> class. /// </summary> /// <param name="context"> /// The context. /// </param> /// <param name="unitOfWork"> /// The unit of work. /// </param> public SupplierRepository(IDataContextAsync context, IUnitOfWorkAsync unitOfWork) : base(context, unitOfWork) { }
public UnitOfWork(IDataContextAsync dataContext) { _dataContext = dataContext; _commandRepositories = new Dictionary <string, dynamic>(); }
public CustomerRepository2(IDataContextAsync context, IObjectMapper mapper) : base(context, mapper) { }