public ICollection <VisitorViewModel> GetPagedVisitors(int page, int pageSize) { if (page <= 0) { throw new ArgumentOutOfRangeException(nameof(page)); } if (pageSize <= 0) { throw new ArgumentOutOfRangeException(nameof(pageSize)); } var lastVisitors = _visitorService.GetPagedVisitors(page, pageSize); var visitors = _mapper.Map <ICollection <VisitorViewModel> >(lastVisitors); return(visitors); }