Exemplo n.º 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());
        }
Exemplo n.º 2
0
 public async Task CreateAsync(Guid id, string email)
 => await _customerRepository.CreateAsync(new Customer(id, email));
Exemplo n.º 3
0
 public async Task <Customer> CreateCustomerAsync(Customer model)
 {
     return(await _customersRepository.CreateAsync(model));
 }