public PagedResultsDto GetAllFloor(long adminId, int page, int pageSize) { PagedResultsDto results = new PagedResultsDto(); results.TotalCount = _floorService.Query(x => x.AdminId == adminId && !x.IsDeleted).Select().Count(); results.Data = Mapper.Map <List <FloorDto> >(pageSize > 0 ? _floorService.Query(x => x.AdminId == adminId && !x.IsDeleted).Select().OrderBy(x => x.FloorId) .Skip((page - 1) * pageSize).Take(pageSize).ToList() : _floorService.Query(x => x.AdminId == adminId && !x.IsDeleted).Select().ToList()); return(results); }