public async Task <CoffeePlaceResponse> Execute(UpdateCoffeePlaceCommand command)
        {
            var coffeePlace = await _coffeePlaceService
                              .Update(command);

            await Commit();

            return(new CoffeePlaceResponse(coffeePlace));
        }
Ejemplo n.º 2
0
        public async Task <CoffeePlace> Update(UpdateCoffeePlaceCommand command)
        {
            var coffeePlace = await _coffeePlaceRepository
                              .GetByIdAsync(command.CoffeePlaceId);

            if (coffeePlace == null)
            {
                throw new NotFoundException("Cafeteria não encontrada");
            }

            coffeePlace.Update(command);

            return(coffeePlace);
        }
Ejemplo n.º 3
0
 public void Update(UpdateCoffeePlaceCommand command)
 {
     Name = command.Name;
 }