public void AddtoDataBase(DogeModel d)
 {
     if (dogs == null)
     {
         dogs = new List <DogeModel>();
     }
     dogs.Add(d);
     SaveDataBase();
 }
        public RedirectToActionResult Edit(string Name, string Breed, string NewName, int Age, string Gender, string OwnersAddress)
        {
            DogeModel dog = Startup.dm.dogs.Find(t => t.Name == Name);

            dog.Breed         = Breed;
            dog.Name          = NewName;
            dog.Age           = Convert.ToInt32(Age);
            dog.Gender        = Gender;
            dog.OwnersAddress = OwnersAddress;
            Startup.dm.SaveDataBase();
            Startup.dm.LoadDataBase();
            return(RedirectToAction("List"));
        }
        public IActionResult Edit(string Name)
        {
            DogeModel dog = Startup.dm.dogs.Find(t => t.Name == Name);

            return(View(dog));
        }