public async Task <ActionResult <CollegeDto> > GetCollegeAsync([FromRoute] Guid collegeId) { var college = await _collegeRepository.GetByIdAsync(collegeId); return(CollegeDto.From(college)); }
public async Task <ActionResult <List <CollegeDto> > > GetAllCollegesAsync() { var data = await _collegeRepository.ListAllAsync(); return(data.Select(o => CollegeDto.From(o)).OrderBy(o => o.CollegeName).ToList()); }