我正在尝试生成一个选择列表,该选择列表从所有者列表中构造了被阻止的用户。我究竟做错了什么?
var ownerlist = (new SelectList(_userManager.GetUsersInRoleAsync("Owner").Result, "Id", "Fullname")).OrderBy(x =>x.Value);
var blockedUsers = (new SelectList(_userManager.Users.Where(u => u.UserAccountIsBlocked == UserAccountIsBlocked.Yes), "Id", "Fullname")).OrderBy(x => x.Value);
var list = ownerlist.Except(blockedUsers);