Beispiel #1
0
        public Pet Create(Pet petToCreate)
        {
            List <Pet> updatedPetsList = ReadAll().List.ToList();

            petToCreate.Id    = FakeDB.GetNextPetId();
            petToCreate.Owner = FakeDB.ReadOwnerData().FirstOrDefault(o => o.Id == petToCreate.Owner.Id);
            updatedPetsList.Add(petToCreate);
            FakeDB.UpdatePetData(updatedPetsList);
            return(petToCreate);
        }