public async Task <int> CountUsersForAdminSearch(int siteId, string searchInput) { if (multiTenantOptions.UseRelatedSitesMode) { siteId = multiTenantOptions.RelatedSiteId; } return(await dbSiteUser.CountUsersForAdminSearch(siteId, searchInput)); }
//public async Task<int> CountUsersForSearch(int siteId, string searchInput) //{ // return await dbSiteUser.CountUsersForSearch(siteId, searchInput); //} //public async Task<List<IUserInfo>> GetUserSearchPage( // int siteId, // int pageNumber, // int pageSize, // string searchInput, // int sortMode) //{ // //sortMode: 0 = DisplayName asc, 1 = JoinDate desc, 2 = Last, First // List<IUserInfo> userList = new List<IUserInfo>(); // using (DbDataReader reader = await dbSiteUser.GetUserSearchPage( // siteId, // pageNumber, // pageSize, // searchInput, // sortMode)) // { // while (reader.Read()) // { // UserInfo user = new UserInfo(); // user.LoadFromReader(reader); // userList.Add(user); // } // } // return userList; //} public async Task <int> CountUsersForAdminSearch( int siteId, string searchInput, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); return(await dbSiteUser.CountUsersForAdminSearch(siteId, searchInput, cancellationToken)); }
//public async Task<int> CountUsersForSearch(int siteId, string searchInput) //{ // return await dbSiteUser.CountUsersForSearch(siteId, searchInput); //} //public async Task<List<IUserInfo>> GetUserSearchPage( // int siteId, // int pageNumber, // int pageSize, // string searchInput, // int sortMode) //{ // //sortMode: 0 = DisplayName asc, 1 = JoinDate desc, 2 = Last, First // List<IUserInfo> userList = new List<IUserInfo>(); // using (DbDataReader reader = await dbSiteUser.GetUserSearchPage( // siteId, // pageNumber, // pageSize, // searchInput, // sortMode)) // { // while (reader.Read()) // { // UserInfo user = new UserInfo(); // user.LoadFromReader(reader); // userList.Add(user); // } // } // return userList; //} public async Task <int> CountUsersForAdminSearch(int siteId, string searchInput) { return(await dbSiteUser.CountUsersForAdminSearch(siteId, searchInput)); }