public async Task <PagedResult <DrivingSchoolGrid> > RetrieveDrivingSchoolAvailability(DrivingSchoolAvailabilityFilter drivingSchoolAvailability, List <OrderBy> orderBy = null, Paging paging = null) { var predicate = BuildDrivingSchoolAvailabilityPredicate(drivingSchoolAvailability); var test = await _dataService.RetrievePagedResultAsync <Data.Entities.StudentDrivingDetail>(predicate); var drivingSchoolIds = test.Items.Select(e => e.DrivingSchoolId).ToList(); var data = await _dataService.RetrievePagedResultAsync <Data.Entities.DrivingSchoolGrid>(e => !drivingSchoolIds.Contains(e.DrivingSchoolId), orderBy, paging); return(_mapper.MapToPagedResult <DrivingSchoolGrid>(data)); }
public async Task <PagedResult <DrivingSchoolGrid> > RetrieveDrivingSchools(List <OrderBy> orderBy = null, Paging paging = null) { var data = await _dataService.RetrievePagedResultAsync <Data.Entities.DrivingSchoolGrid>(e => true, orderBy, paging); return(_mapper.MapToPagedResult <DrivingSchoolGrid>(data)); }