示例#1
0
        public async Task <List <User> > HandleAsync(GetUsersQuery query)
        {
            var db = _userRepository.Get(new UserQueryOptions
            {
                IncludeClaims    = query.IncludeClaims,
                IncludeUserRoles = query.IncludeUserRoles,
                IncludeRoles     = query.IncludeRoles,
                AsNoTracking     = query.AsNoTracking,
            });

            return(await _userRepository.ToListAsync(db));
        }
示例#2
0
        public List <User> Handle(GetUsersQuery query)
        {
            var db = _userRepository.Get(new UserQueryOptions
            {
                IncludeClaims    = query.IncludeClaims,
                IncludeUserRoles = query.IncludeUserRoles,
                IncludeRoles     = query.IncludeRoles,
                AsNoTracking     = query.AsNoTracking,
            });

            return(db.ToList());
        }