//-> GetList public async Task <GetListDTO <RatingDriverViewDTO> > GetList(RatingDriverFindDTO findDTO) { IQueryable <RatingDriverFindResultDTO> query = from r in db.tblRatings join c in db.tblCustomers on r.customerID equals c.id join d in db.tblDrivers on r.driverID equals d.id where r.deleted == null && (findDTO.customerID == 0 ? 1 == 1 : c.id == findDTO.customerID) select new RatingDriverFindResultDTO { id = r.id, star = r.star, driverCode = d.driverCode, driverName = d.driverName, customerCode = c.customerCode, customerName = c.customerName }; query = query.AsQueryable().OrderBy($"{findDTO.orderBy} {findDTO.orderDirection}"); return(await ListingHandler(findDTO.currentPage, query)); }
public async Task <ActionResult> Paging(RatingDriverFindDTO findDTO) { return(PartialView(await handler.GetList(findDTO))); }