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)); }
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()); }