internal void addAnimalToDb(string animalName, string animalImagePath) { AnimalRepository animalRepository = new AnimalRepository(); Animal animal = new Animal(); animal.animalName = animalName; animal.animalImage = animalImagePath; animalRepository.Add(animal); }
private void ShowAnimals() { IRepository <Animal> animalRep = new AnimalRepository(); foreach (Animal animal in animalRep.List) { Animal newAnimal = new Animal(); newAnimal.animalName = animal.animalName; newAnimal.animalImage = animal.animalImage; animalsCollection.Add(newAnimal); } }