Пример #1
0
 public IndexModel(ILogger <IndexModel> logger, ICustomerRepositoryAsync customer, IUnitOfWork unitOfWork, IRazorRenderService renderService)
 {
     _logger        = logger;
     _customer      = customer;
     _unitOfWork    = unitOfWork;
     _renderService = renderService;
 }
Пример #2
0
        private static async Task AddCustomerTest(ICustomerRepositoryAsync customerRepository)
        {
            //  ICustomerRepositoryAsync customerRepository = new ApiCustomerRepository(new HttpClient());

            CustomerFaker customerFaker = new CustomerFaker(new AddressFaker());
            Customer      customer      = customerFaker.Generate();
            await customerRepository.AddAsync(customer);
        }
Пример #3
0
 public BasicAuthenticationHandler(
     IOptionsMonitor <AuthenticationSchemeOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     ICustomerRepositoryAsync customerRepository
     ) : base(options, logger, encoder, clock)
 {
     this.customerRepository = customerRepository;
 }
Пример #4
0
        private static async Task GetCustomersTest(ICustomerRepositoryAsync customerRepository)
        {
            //ICustomerRepositoryAsync customerRepository = new ApiCustomerRepository(new HttpClient());

            var customers = await customerRepository.GetAsync();

            foreach (var customer in customers)
            {
                Console.WriteLine(customer.FirstName);
            }
        }
Пример #5
0
 public CustomersController(ICustomerRepositoryAsync customerRepository, ILoggerFactory loggerFactory)
 {
     this._customerRepository = customerRepository;
     this._logger             = loggerFactory.CreateLogger(nameof(CustomersController));
 }
Пример #6
0
 public DeleteCustomerByIdCommandHandler(ICustomerRepositoryAsync customerRepository)
 {
     _customerRepository = customerRepository;
 }
 public CustomerServiceAsync(ICustomerRepositoryAsync repostory) : base(repostory)
 {
     _repostory = repostory;
 }
Пример #8
0
 public GetAllCustomersQueryHandler(ICustomerRepositoryAsync customersRepository, IMapper mapper)
 {
     _customersRepository = customersRepository;
     _mapper = mapper;
 }
Пример #9
0
 public CreateCustomerCommandHandler(ICustomerRepositoryAsync customerRepository, IMapper mapper)
 {
     _customerRepository = customerRepository;
     _mapper             = mapper;
 }
Пример #10
0
 public CustomersControllerAsync(ICustomerRepositoryAsync customerRepository)
 {
     this.customerRepository = customerRepository;
 }
 public GetCustomerByIdQueryHandler(ICustomerRepositoryAsync customerRepository)
 {
     _customerRepository = customerRepository;
 }