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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -