Beispiel #1
0
        public async Task <ActionResult> Get(EnumOrderStates state)
        {
            var result = await _mediator.Send(new GetOrdersQuery(state));

            if (result.Succeeded)
            {
                return(result.Value.AsGetResult());
            }

            return(result.ToJsonApiErrors(_mapper).AsNotFoundErrorResult());
        }
Beispiel #2
0
 public GetOrdersQuery(EnumOrderStates status)
 {
     State = status;
 }