Esempio n. 1
0
        public async Task <IEnumerable <WhilistBasketDto> > Handle(CreateWhilistBasket request, CancellationToken cancellationToken)
        {
            var command = await repository.Create(request.catalog);

            return(mapper.Map <IEnumerable <WhilistBasketDto> >(command));
        }
Esempio n. 2
0
      public async Task <IActionResult> Create([FromBody] CreateWhilistBasket command)
      {
          var result = await mediator.Send(command);

          return(CreatedAtAction("CreateWhilistBasket", new { x = result.SelectMany(x => x.baskets).ToList(), result }));
      }