Example #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();
        }
Example #2
0
 public List <Trainees> AddTraniee(Trainees addNewTrainee)
 {
     trainees.Add(addNewTrainee);
     return(trainees);
 }