Blog.Admin.Web.Controllers.HobbiesController.GetErrorList C# (CSharp) Метод

GetErrorList() приватный Метод

private GetErrorList ( ModelState>.IEnumerable modelState ) : string[]>.Dictionary
modelState ModelState>.IEnumerable
Результат string[]>.Dictionary
        private Dictionary<string, string[]> GetErrorList(IEnumerable<KeyValuePair<string, ModelState>> modelState)
        {
            var errorList = modelState.ToDictionary(
                        kvp => kvp.Key,
                        kvp => kvp.Value.Errors.Select(e => e.ErrorMessage).ToArray()
                    );
            Response.StatusCode = 400;
            return errorList;
        }
    }