I have a Select List of all users from Identity that pulls in CompanyName from ApplicationUser.
<select asp-for="Contact.GeneralClientName" class="custom-select mr-sm-2" asp-items="@(new SelectList(Model.Users, "Id", "CompanyName"))">
<option selected="selected" value="0">Please Select</option>
</select>
In this list I need to omit users who have 1 of 2 roles: ContactManagers
and ContactAdministrators
Currently I'm querying the users using:
Users = await UserManager.Users.ToListAsync();
I thought about giving each new user a role and then filtering the List based on that, but at this point that would be a big redo. I only need to hide 2 users that each have one of those roles associated with them, any help is greatly appreciated.
Thanks,