public static List <Department> GetDepartmentById(Guid collegeId) { List <tblDepartment> department = dropDownRepository.GetDepartmentById(collegeId); List <Department> list = new List <Department>(); foreach (var item in department) { Department departmentobj = new Department() { DepartmentID = item.DepartmentID, DepartmentName = item.DepartmentName }; list.Add(departmentobj); } return(list); }