public AddStatus AddTrainee(Trainee t) { AddStatus addStatus = AddStatus.Add; Trainee trainee = null; trainee = dal.searchTrainee(t.Id); if (trainee != null) { addStatus = AddStatus.Update; UpdateTrainee(t); } else { dal.AddTrainee(t); } return(addStatus); }