entity framework 5 - How do I construct a delegate and pass it as a parameter to be used in a lambda expression -
i refactoring code original statement was
var deletelist = new list<filterparameter>(); foreach (filterparameter param in filterparameters) { if (memlist.all(x => x.parametername != param.parametername)) { deletelist.add(param); } }
now want
var deletelist = ufs.filterparameters.where(param => memlist.all(rule2)).tolist();
i unsure how construct , pass in delegate
i'm not entirely sure understand you, asking how pass predicate in .where()
, because work like:
func<filterparameter, bool> predicate = param => memlist.all(x => x.parametername != param.parametername); list<filterparameter> deletelist = filterparameters.where(predicate).tolist();
is you're asking ?
Comments
Post a Comment