示例#1
0
        public async Task <IEnumerable <WhilistBasketDto> > Handle(CreateManyWhilistBasket request, CancellationToken cancellationToken)
        {
            var command = await repository.CreateMany(request.items);

            return(mapper.Map <IEnumerable <WhilistBasketDto> >(command));
        }
示例#2
0
      public async Task <IActionResult> CreateMany([FromBody] CreateManyWhilistBasket command)
      {
          var result = await mediator.Send(command);

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