Пример #1
0
        public async Task HandleAsync(CustomerCreated @event, ICorrelationContext context)
        {
            var customer = await _customersService.GetByIdAsync(@event.Id);

            await _customersRepository.CreateAsync(customer);

            await _cache.SetCartAsync(@event.Id, new Cart());
        }
Пример #2
0
 public async Task CreateAsync(Guid id, string email)
 => await _customerRepository.CreateAsync(new Customer(id, email));
Пример #3
0
 public async Task <Customer> CreateCustomerAsync(Customer model)
 {
     return(await _customersRepository.CreateAsync(model));
 }