Example #1
0
 public IndexModel(ILogger <IndexModel> logger, ICustomerRepositoryAsync customer, IUnitOfWork unitOfWork, IRazorRenderService renderService)
 {
     _logger        = logger;
     _customer      = customer;
     _unitOfWork    = unitOfWork;
     _renderService = renderService;
 }
        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);
        }
Example #3
0
 public BasicAuthenticationHandler(
     IOptionsMonitor <AuthenticationSchemeOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     ICustomerRepositoryAsync customerRepository
     ) : base(options, logger, encoder, clock)
 {
     this.customerRepository = customerRepository;
 }
        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);
            }
        }
Example #5
0
 public CustomersController(ICustomerRepositoryAsync customerRepository, ILoggerFactory loggerFactory)
 {
     this._customerRepository = customerRepository;
     this._logger             = loggerFactory.CreateLogger(nameof(CustomersController));
 }
Example #6
0
 public DeleteCustomerByIdCommandHandler(ICustomerRepositoryAsync customerRepository)
 {
     _customerRepository = customerRepository;
 }
 public CustomerServiceAsync(ICustomerRepositoryAsync repostory) : base(repostory)
 {
     _repostory = repostory;
 }
Example #8
0
 public GetAllCustomersQueryHandler(ICustomerRepositoryAsync customersRepository, IMapper mapper)
 {
     _customersRepository = customersRepository;
     _mapper = mapper;
 }
Example #9
0
 public CreateCustomerCommandHandler(ICustomerRepositoryAsync customerRepository, IMapper mapper)
 {
     _customerRepository = customerRepository;
     _mapper             = mapper;
 }
Example #10
0
 public CustomersControllerAsync(ICustomerRepositoryAsync customerRepository)
 {
     this.customerRepository = customerRepository;
 }
 public GetCustomerByIdQueryHandler(ICustomerRepositoryAsync customerRepository)
 {
     _customerRepository = customerRepository;
 }