Let's say that I have a linq r query request in db.Roles, where r.RoleName does NOT contain ("Administrator") selects r;
It does not contain the part that bothers me. I understand that I can do this. Calls, but how do you do the opposite?
Thank!
Update:
I found the Exclude method, and here is how I used it:
var role = (from r in db.Roles
orderby r.RoleName
select r)
.Except(from r in db.Roles
where r.RoleName == "Administrator" & r.RoleName == "DataEntry"
select r
);
source
share