使用 Tuple.Create 可以搞定
var (email, status) = await _userRepository.GetByUserId(userId)
.Select(u => Tuple.Create(u.Email, u.Status))
.FirstOrDefaultAsync();
await _userRepository.GetByUserId(userId)这里要保证是iqueryable对象,可用tolist()把iqueryable转化为iqueryable集合类型,然后Select(u => Tuple.Create(u.Email, u.Status))即可,第一步不转化会报错