public async Task<DanhSachUserOutput> GetAll(FilterUserInput input) { int totalCount = this._userTable.GetTotal(input.GroupId, input.Keyword); IEnumerable<User> users = this._userTable.GetPaging(input.PageSize, input.PageNumber, input.GroupId, input.Keyword); foreach (User user in users) { IList<Claim> claims = await this.UserManager.GetClaimsAsync(user.Id); Claim displayName = Enumerable.FirstOrDefault<Claim>((IEnumerable<Claim>)claims, (Func<Claim, bool>)(m => m.Type == "displayName")); if (displayName != null) user.DisplayName = displayName.Value; } DanhSachUserOutput result = new DanhSachUserOutput() { DanhSachUsers = users, TotalCount = (long)totalCount }; return result; }
public async Task<DanhSachUserOutput> GetAll(FilterUserInput filter) { return await _userBll.GetAll(filter); }