Beispiel #1
0
        public List <Trainees> UpdateTrainee(Trainees updatedTrainee)
        {
            var deletingTrainee = trainees.Find(t => t.TraineeId == updatedTrainee.TraineeId);

            if (deletingTrainee == null)
            {
                trainees.Add(updatedTrainee);
            }
            else
            {
                trainees.Remove(deletingTrainee);
                trainees.Add(updatedTrainee);
            }
            return(trainees);
            //throw new NotImplementedException();
        }
Beispiel #2
0
 public List <Trainees> AddTraniee(Trainees addNewTrainee)
 {
     trainees.Add(addNewTrainee);
     return(trainees);
 }