コード例 #1
0
ファイル: UserBll.cs プロジェクト: quangnc0503h/ecommerce
 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;
 }
コード例 #2
0
 public async Task<DanhSachUserOutput> GetAll(FilterUserInput filter)
 {
     return await _userBll.GetAll(filter);
 }