public NorthwindUnitOfWork() { _dbContext = new NorthwindSlim(); _productsRepository = new ProductsRepository(_dbContext); _customersRepository = new CustomersRepository(_dbContext); _ordersRepository = new OrdersRepository(_dbContext); }
public void Setup() { // Arrange _context = new FakeMyDbContext(); _context.Customers.Attach(new Customer { CustomerId = "1", CompanyName = "abc" }); _context.Customers.Attach(new Customer { CustomerId = "2", CompanyName = "def" }); _customersRepository = new CustomersRepository(_context); }
public CustomersViewModel( IMessageDialogService messageDialogService, ICustomersRepository customersRepository, IOrdersRepository ordersRepository) { _messageDialogService = messageDialogService; _customersRepository = customersRepository; _ordersRepository = ordersRepository; Customers = new ObservableCollection<CustomerWrapper>( _customersRepository.GetCustomers().Select(x => new CustomerWrapper(x))); OrderStatuses = new ObservableCollection<OrderStatusWrapper>( _ordersRepository.GetOrderStatuses().Select(x => new OrderStatusWrapper(x))); SaveCommand = new DelegateCommand(OnAdd); CancelCommand = new DelegateCommand(OnCancel); }
public CustomerCommandHandler(IUnitOfWork uow, IMediatorHandler bus, INotificationHandler <DomainNotification> notifications, ICustomersRepository customersRepository) : base(uow, bus, notifications) { _customersRepository = customersRepository; _bus = bus; }
public RentalsController(IRentalsRepository rentalsRepository, ICarsRepository carsRepository, ICustomersRepository customersRepository) { _rentalsRepository = rentalsRepository; _carsRepository = carsRepository; _customersRepository = customersRepository; }
public CustomerController(ICustomersRepository repo) { repository = repo; }
public HomeController(ICustomersRepository customersRepository) { _customersRepository = customersRepository; }
/// <summary> /// Constructor. /// </summary> /// <param name="customersRepository">The injected and implemented ICustomerRepository instance.</param> public CustomersController(ICustomersRepository customersRepository) { this.customersRepository = customersRepository; }
public CustomersApiController(ICustomersRepository customersRepo, ILoggerFactory loggerFactory) { _CustomersRepository = customersRepo; _Logger = loggerFactory.CreateLogger(nameof(CustomersApiController)); }
public SignedUpHandler(ICustomersRepository customersRepository) { _customersRepository = customersRepository; }
public OrdersRepository(ICustomersRepository customersRepo) { CustomersRepo = customersRepo; Orders = new List <Order>(); }
public CustomerLoadQueryHandler(ICustomersRepository customersRepository) { this.customersRepository = customersRepository; }
public CustomersController(ApplicationDbContext db) { _repo = new CustomersRepository(db); _db = db; }
public CustomersController(ICustomersRepository customersRepository, ILoggerFactory loggerFactory) { _customersRepository = customersRepository; _logger = loggerFactory.CreateLogger(nameof(CustomersController)); }
public GetOrderHandler(IOrdersRepository ordersRepository, ICustomersRepository customersRepository) { _ordersRepository = ordersRepository; _customersRepository = customersRepository; }
public GetAllCustomersHandler(ICustomersRepository customersRepository, IMapper mapper) { _customersRepository = customersRepository; _mapper = mapper; }
public CustomersController(ICustomersRepository customerRepo, IProductsRepository productsRepo, IMapper mapper) { _customersRepo = customerRepo; _productsRepo = productsRepo; _mapper = mapper; }
/// <summary> /// Default constructor takes an ICustomersRepository as an argument /// </summary> /// <param name="customersRepository">The customer repository to use</param> public CustomersController(ICustomersRepository customersRepository) { this.customersRepository = customersRepository; }
public CustomerSearchService(ICustomersRepository repository) { _customersRepository = repository; }
public GetCustomerByIdHandler(IMapper mapper, ICustomersRepository customersRepository) { _mapper = mapper; _customersRepository = customersRepository; }
public AddCustomerCommandHandler(ICustomersRepository repository, IMapper mapper) => (_repository, _mapper) = (repository, mapper);
public OperationsService(IMoRepository moRepository, ICustomersRepository customersRepository) { _moRepository = moRepository; _customerRepository = customersRepository; }
public GetCustomerHandler(ICustomersRepository customersRepository) { _customersRepository = customersRepository; }
public RideFactory(ICouponsRepository couponsRepository, ICustomersRepository customersRepository) { _couponsRepository = couponsRepository; _customersRepository = customersRepository; }
public CustomersController(ICustomersRepository db) { this._db = db; }
public CustomersService(ICustomersRepository repo, IMapper mapper) { _repo = repo; _mapper = mapper; }
public CustomerHandlerQueries(ICustomersRepository customersRepository) { _customersRepository = customersRepository; }
public CustomerCreatedHandler(ICustomersRepository customersRepostitory) { _customersRepository = customersRepostitory; }
public CustomersServiceController(ICustomersRepository repo) { _repo = repo; }
public Mapper(ICustomersRepository customersRepository) { _customersRepository = customersRepository; }
public CustomersRepository(ICustomersRepository customersRepository) { _customersRepository = customersRepository; }
public AddEditCustomerViewModel(ICustomersRepository repo) { _repo = repo; SaveCommand = new RelayCommand(OnSave, CanSave); CancelCommand = new RelayCommand(OnCancel); }
public CustomersServices( ICustomersRepository customersRepo) { _customersRepository = customersRepo ?? throw new ArgumentNullException(nameof(customersRepo)); }
public CustomerAddCommandHandler(ICustomersRepository customersRepository, IMediator mediator) { this.customersRepository = customersRepository; this.mediator = mediator; }
public CustomersController(ICustomersRepository customersRepository, ILogger <CustomersController> logger) { _CustomersRepo = customersRepository; _Logger = logger; }
public CustomersManagement(ICustomersRepository customersRepository) { _customersRepository = customersRepository; }