Пример #1
0
        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");
        }
Пример #2
0
 public IActionResult AddFood(string food)
 {
     fox.AddFood(food);
     log.Add($"{localDate.ToString()} - Added {food} to the food-list.");
     return(RedirectToAction("nutrition"));
 }