Esempio n. 1
0
        internal void addAnimalToDb(string animalName, string animalImagePath)
        {
            AnimalRepository animalRepository = new AnimalRepository();
            Animal           animal           = new Animal();

            animal.animalName  = animalName;
            animal.animalImage = animalImagePath;

            animalRepository.Add(animal);
        }
Esempio n. 2
0
        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);
            }
        }