/// <summary> /// Gets resources on which user is having read permission. /// </summary> /// <param name="token">Authentication Token</param> /// <param name="fetchedRecords">Records fetched</param> /// <param name="pageSize">Page size</param> /// <param name="totalRecords">Total record count</param> /// <param name="sortExpression">Column to sort on</param> /// <param name="sortDirection">Direction to sort in</param> /// <returns>List of Entities</returns> private IList <Resource> GetEntityList(AuthenticatedToken token, int fetchedRecords, int pageSize, out int totalRecords, string sortExpression, System.Web.UI.WebControls.SortDirection sortDirection) { using (ResourceDataAccess dataAccess = new ResourceDataAccess(base.CreateContext())) { if (sortDirection == System.Web.UI.WebControls.SortDirection.Ascending) { return(dataAccess.SearchForResources(token, SearchCriteria, fetchedRecords, pageSize, out totalRecords, sortExpression, Zentity.Platform.SortDirection.Ascending, IsSecurityAwareControl).ToList()); } else { return(dataAccess.SearchForResources(token, SearchCriteria, fetchedRecords, pageSize, out totalRecords, sortExpression, Zentity.Platform.SortDirection.Descending, IsSecurityAwareControl).ToList()); } } }