예제 #1
0
        public static BadRequestObjectResult AsBadRequest(this ValidationResult validationResult)
        {
            if (validationResult.IsValid)
            {
                return(null);
            }

            return(new BadRequestObjectResult(validationResult.AsModelStateDictionary()));
        }