Beispiel #1
0
 public GetProductsByPriceAndNameHandler(
     IProductRepository productRepository,
     IUnitOfWork unitOfWork,
     IMediator mediator)
 {
     ProductRepository = productRepository ?? throw CoreException.NullArgument(nameof(productRepository));
     UnitOfWork        = unitOfWork ?? throw CoreException.NullArgument(nameof(unitOfWork));
     Mediator          = mediator ?? throw CoreException.NullArgument(nameof(mediator));
 }
Beispiel #2
0
 protected RepositoryBase(TDbContext dbContext)
 {
     DbContext = dbContext ?? throw CoreException.NullArgument(nameof(dbContext));
 }
Beispiel #3
0
 public UnitOfWork(IEnumerable <DbContext> dbContexts, IMediator mediator)
 {
     _dbContexts = dbContexts ?? throw CoreException.NullArgument(nameof(dbContexts));
     _mediator   = mediator ?? throw CoreException.NullArgument(nameof(mediator));
 }