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