public FoxService() { Fox mrFox = new Fox("Mr. Fox"); mrFox.AddFood("Pizza"); mrFox.AddFood("Lemonade"); mrFox.AddTrick("Write HTML"); mrFox.AddTrick("Code in Java"); FoxList = new List <Fox> { mrFox }; ChangeFox("Mr. Fox"); }
public IActionResult AddFood(string food) { fox.AddFood(food); log.Add($"{localDate.ToString()} - Added {food} to the food-list."); return(RedirectToAction("nutrition")); }