Exemplo n.º 1
0
        protected virtual BadRequestObjectResult FailureRequest(Result result)
        {
            var detail = FailureProblemDetail.FromHttpContext(HttpContext, result.Message)
                         .WithFailures(result.Failures);

            return(BadRequest(detail));
        }
Exemplo n.º 2
0
        protected virtual BadRequestObjectResult FailureRequest(ModelStateDictionary modelState)
        {
            var detail = FailureProblemDetail.FromHttpContext(HttpContext).WithFailures(modelState.ToSerializable());

            return(BadRequest(detail));
        }