public async Task <ActionResult <PaginatedCollectionViewModel <DirectoryUser> > > GetDirectoryUsers([FromQuery] PagingOptions pagingOptions, [FromQuery, Required, MinLength(3)] string searchTerm) { var users = await _userQueries.GetDirectoryUsersAsync(searchTerm); users = users.Skip(pagingOptions.Offset.Value).Take(pagingOptions.Limit.Value); var response = new PaginatedCollectionViewModel <DirectoryUser>(pagingOptions.Offset.Value, pagingOptions.Limit.Value, users.ToList(), null); return(Ok(response)); }