I am using .Net Core 2.1 and I want to exclude the users that have the role "Admin" and "SimpleUser" I had followed this example Link
How i can add the where part? So far i have tried this with no luck:
ViewData["ApplicationUserId"] = new SelectList( _context.Users.Include(u=>u.UserRoles).ThenInclude(u=>u.Role).Where(o=>o.UserRoles!="Admin"), "Id", "Company", products.ApplicationUserId);
ApplicationUserRole Class:
public class ApplicationUserRole : IdentityUserRole<string>
{
public virtual ApplicationUser User { get; set; }
public virtual ApplicationRole Role { get; set; }
}