How do I use LINQ across Queryable and non-Queryable data?
With the following code I want to end up with a list of unselected users, i.e. everyone in allUsers that is not in selected.
public IQueryable<CompanyUser> FindAllUsersNotAssignedTothisCompany(int companyID)
{
var allUsers = Membership.GetAllUsers();
var selected = db.CompanyUsers.Where(c => c.CompanyID == companyID);
...?
}
I effectively want a list of User ID's and Names suitable for use in a DropDownList (ASP.NET MVC)