public async Task <ObjectResult> BaseResult(
            [FromBody] CommandRequest request
            )
        {
            try
            {
                request.Validate();
                if (request.Invalid)
                {
                    return(StatusCode(400, new CommandResponse(400, "Requisição inválida", request.Notifications)));
                }
            }
            catch
            {
                // TODO: Logar a exception
                return(StatusCode(400, new CommandResponse(400, "Requisição inválida", null)));
            }

            try
            {
                var result = await _mediator.Send(request);

                return(StatusCode(result.StatusCode, result));
            }
            catch
            {
                // TODO: Logar a exception
                return(StatusCode(500, new CommandResponse(500, "Ops, algo deu errado", null)));
            }
        }
        protected async Task <ObjectResult> Result([FromBody] CommandRequest request)
        {
            try
            {
                request.Validate();
                if (!request.IsValid)
                {
                    return(StatusCode(400, new GenericCommandResult(400, "Requisição inválida", request.Notifications)));
                }

                var result = await _mediator.Send(request);

                return(result.StatusCode switch
                {
                    200 => Ok(result),
                    400 => BadRequest(result),
                    401 => Unauthorized(result),
                    404 => NotFound(result),
                    500 => StatusCode(500, result)
                });
            }