public GetProductsFileQueryHandler(INorthwindDbContext context, ICsvFileBuilder fileBuilder, IMapper mapper, IDateTime dateTime)
 {
     _context     = context;
     _fileBuilder = fileBuilder;
     _mapper      = mapper;
     _dateTime    = dateTime;
 }
        public UpsertCategoryCommandValidator(INorthwindDbContext context)
        {
            _context = context;

            RuleFor(x => x.Name).MaximumLength(100).NotEmpty().NotNull();
            RuleFor(x => x.Name)
            .Must(UniqueName)
            .WithMessage("Category name must be unique.");;
        }
示例#3
0
        public EfGenericRepository(INorthwindDbContext context)
        {
            if (context == null)
            {
                throw new ArgumentException("An instance of DbContext is required to use this repository.", "context");
            }

            this.Context = context;
            this.DbSet   = this.Context.Set <T>();
        }
示例#4
0
 public CategoryRepository(IUnitOfWork uow)
 {
     _context = uow.Context as INorthwindDbContext;
 }
示例#5
0
 public Handler(INorthwindDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
示例#6
0
 public CustomerRepository(IUnitOfWork uow)
 {
     _context = uow.Context as INorthwindDbContext;
 }
 public GetCategoriesListQueryHandler(INorthwindDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public DeleteProductCommandHandler(INorthwindDbContext context)
 {
     _context = context;
 }
示例#9
0
 public Handler(INorthwindDbContext db) => _db = db;
示例#10
0
 public GetEmployeeDetailQueryHandler(INorthwindDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public GetCustomersMostPurchasedProductQueryHandler(INorthwindDbContext context)
 {
     _context = context;
 }
 public UpdateCategoryCommandHandler(INorthwindDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
示例#13
0
 public GetAllEmployeesQueryHandler(INorthwindDbContext context)
 {
     _context = context;
 }
示例#14
0
 public CreateFleetProductCommandHandler(INorthwindDbContext context)
 {
     _context = context;
 }
 public GetSuppliersListQueryHandler(INorthwindDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
 public GetProductDetailQueryHandler(INorthwindDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
示例#17
0
 public GetProductsListQueryHandler(IMapper mapper, INorthwindDbContext dbContext)
 {
     _mapper    = mapper;
     _dbContext = dbContext;
 }
示例#18
0
 public OrdersRepository(IUnitOfWork uow)
 {
     _context = uow.Context as INorthwindDbContext;
 }
 public DeleteCategoryCommandHandler(INorthwindDbContext context)
 {
     _context = context;
 }
示例#20
0
 public GetProductsListQueryHandler(INorthwindDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
示例#21
0
 public CreateProductCommandHandler(INorthwindDbContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
 public UpsertEmployeeCommandHandler(INorthwindDbContext context)
 {
     _context = context;
 }
 public GetCustomerDetailQueryHandler(INorthwindDbContext context)
 {
     _context = context;
 }
示例#24
0
 public ProductsRepository(IUnitOfWork uow)
 {
     _context = uow.Context as INorthwindDbContext;
 }
示例#25
0
 public DeleteEmployeeCommandHandler(INorthwindDbContext context, IUserManager userManager, ICurrentUserService currentUser)
 {
     _context     = context;
     _userManager = userManager;
     _currentUser = currentUser;
 }
 public DeleteCustomerCommandHandler(INorthwindDbContext context)
 {
     _context = context;
 }
示例#27
0
 public Handler(INorthwindDbContext context, IMediator mediator)
 {
     _context  = context;
     _mediator = mediator;
 }
示例#28
0
 public GetProductQueryHandler(INorthwindDbContext context)
 {
     _context = context;
 }
示例#29
0
 public SeedSampleDataCommandHandler(INorthwindDbContext context, IUserManager userManager)
 {
     _context     = context;
     _userManager = userManager;
 }
示例#30
0
 public Handler(INorthwindDbContext context)
 {
     _context = context;
 }
 public GetAllProductsQueryHandler(INorthwindDbContext context, IMapper mapper, IOptions <ConnectionStringConfig> configAccessor)
 {
     _context        = context;
     _mapper         = mapper;
     _configAccessor = configAccessor;
 }
示例#32
0
 public UpsertCategoryCommandHandler(INorthwindDbContext context)
 {
     _context = context;
 }
示例#33
0
 public GetCustomerDetailQueryHandler(INorthwindDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public GetCategoryPreviewQueryHandler(INorthwindDbContext context)
 {
     _context = context;
 }