public ActionResult CharacterCount(CharacterCountTool countTool) { if (ModelState.IsValid) { var charCounter = new CharacterCounter(); var counts = new CharacterCounts(); counts = charCounter.CountCharacters(countTool.TextInput); countTool.Consonants = counts.Consonants; countTool.ConsonantList = counts.ConsonantList; countTool.Vowels = counts.Vowels; countTool.VowelList = counts.VowelList; countTool.Ys = counts.Ys; countTool.Spaces = counts.Spaces; countTool.TotalCharacters = counts.TotalCharacters; countTool.Punctuation = counts.Punctuation; countTool.NonLetters = counts.NonLetters; return(View("CharacterCount", countTool)); } return(View("CharacterCount")); }
//*************Level 2 Labs*************** public ActionResult CharacterCount() { var model = new CharacterCountTool(); return(View(model)); }