public SearchResult <OrganizationUserViewModel> SearchOrganizationUser(OrganizationUserSearchTerms searchTerms) { return(_session.Query <OrganizationUserViewModel>() .ApplyOrganizationFilter(_userContext) .ApplyOrderBy(searchTerms.OrderBy) .FetchSimpleSearchResult(searchTerms.PagingData ?? new PagingData(1, DefaultPageSize, 0))); }
public IHttpActionResult GerOrganizationUserSearchResult([FromUri] OrganizationUserSearchTerms searchTerms) { if (!_userContext.CurrentUserIsSystemUser()) { return(Unauthorized()); } if (searchTerms == null) { searchTerms = new OrganizationUserSearchTerms(); } return(_queryService.SearchOrganizationUser(searchTerms).ToJson(this)); }