New to LINQ and not sure of the correct syntax of what I want to do.
I have a Black List, an array, or a list of (maybe either) incorrect codes that I don’t want to put in this new “key list”, which I’m doing
currently...
var keys = (from s in context.Keys where s.Code != "BadCode1" where s.Code != "BadCode2" where s.Code != "BadCode3" where s.Code != "BadCode4" where s.Code != "BadCode5" orderby s.Name select s).ToList<Keys>();
how would I cut it to one line and read it from the black list? so more ...
var keys = (from s in context.Keys where s.Code != ANY OF THE VALUES FROM "BLACKLIST" orderby s.Name select s).ToList<Keys>();
user5850963
source share