public async Task <IActionResult> All() { var receptionist = receptionistService.GetAllReceptionists() .To <ReceptionistAllViewModel>().ToList(); return(View(receptionist)); }
private PagedResultsDto GetAllReceptionist(long adminId, int page, int pageSize) { var receptionistCount = _receptionistService.Query(x => !x.IsDeleted && x.AdminId == adminId).Select().Count(); var receptionists = Mapper.Map <List <ReceptionistDto> >(_receptionistService.GetAllReceptionists(adminId, page, pageSize)); PagedResultsDto results = new PagedResultsDto { TotalCount = receptionistCount, Data = receptionists }; return(results); }