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

            await Commit();

            return(new CoffeePlaceResponse(coffeePlace));
        }
Esempio n. 2
0
        public async Task <CoffeePlace> Create(CreateCoffeePlaceCommand command)
        {
            var coffeePlace = new CoffeePlace(command);

            await _coffeePlaceRepository
            .AddAsync(coffeePlace);

            return(coffeePlace);
        }
Esempio n. 3
0
 public CoffeePlace(CreateCoffeePlaceCommand command) : this()
 {
     Name = command.Name;
 }