예제 #1
0
        protected virtual BadRequestObjectResult FailureRequest(Result result)
        {
            var detail = FailureProblemDetail.FromHttpContext(HttpContext, result.Message)
                         .WithFailures(result.Failures);

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

            return(BadRequest(detail));
        }