public List <Programs> FindAll(string CurrentUsername) { List <Programs> ProgramsLists = ProgramRepository.FindAll(); ProgramsLists.ForEach(Program => Program.Department = DepartmentService.FindById(Program.Department.Id, CurrentUsername)); return(ProgramsLists); }
public List <Programs> FindAll() { return(programRepository.FindAll().OrderBy(program => program.PName).ToList()); }