Beispiel #1
0
        public Puppy Add(Puppy puppy)
        {
            if (puppy == null)
            {
                throw new ArgumentNullException("puppy");
                return(null);
            }

            puppy.Id = _nextId++;

            //puppy.Id = Guid.NewGuid().ToString();
            _puppy[puppy.Id] = puppy;

            return(puppy);
        }
Beispiel #2
0
 public void Update(Puppy puppy)
 {
     _puppy[puppy.Id] = puppy;
 }