IronPython and Entity Framework -


possibly simple question, i'm new ironpython. use ironpython crawl entity pass it, when try use extension methods, it, sort of expected, blows up. how traverse pocos in ironpython?

delegate bool evaluaterule(myentity entity); //keep in mind test, no actual value provided string expression = @"entity.flags.firstordefault() == null"; myentity entity = new myentity(); pythonengine engine = new pythonengine(); evaluaterule rule = engine.createlambda<evaluaterule>(expression); bool result = rule.invoke(entity); 

i following: 'entitycollection[myentity]' object has no attribute 'firstordefault'

thanks in advance!

you can call extension methods regular static methods:

string expression = @"enumerable.firstordefault(entity.flags) == null"; 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -