private bool ModelStateAndCategoryNameIsValid(Category category) { return ModelState.IsValid && !string.IsNullOrEmpty(category.Name); }