public List <SelectListItem> GetAllTrainersSlItems() { var trainers = _batchManager.GetAllTrainers(); var slItems = new List <SelectListItem>(); foreach (var trainer in trainers) { var sli = new SelectListItem(); sli.Text = trainer.Name + " - " + trainer.Code; sli.Value = trainer.Id.ToString(); slItems.Add(sli); } return(slItems); }