Method of Queryable take expression trees. Ruby lambdas are not convertible to expression trees. You need to build the expression tree yourself.
Tomas From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, April 07, 2009 11:06 AM To: ironruby-core Subject: [Ironruby-core] Linq syntax? Hi What would be the syntax to call Linq methods? for example: I have an IQueryable<Users> and I want to get the equivalent out of from user in MyRepository.Users where user.name<http://user.name> == "somename" That of course is only one example, I want to do a lot more :) My best guess is that I would have to do something like this only it doesn't work System::Linq::Queryable.where(MyRepository.Users, lambda { |user| user.name<http://user.name> == "somename" }) yields wrong number of arguments (2 for 2147483647) So what is the correct way? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero)
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core