public async Task <ActionResult <IEnumerable <OrderDto> > > Get(string username) { var u = new GetOrderByUserName(username); var o = await _mediator.Send(u); return(Ok(o)); }
public async Task <IEnumerable <OrderDto> > Handle(GetOrderByUserName request, CancellationToken cancellationToken) { var orders = await _repository.GetOrderByUserNameAsync(request.UserName); return(MapperObject.Mapper.Map <IEnumerable <OrderDto> >(orders)); }