1

Closed

passing arguments for where constraint

description

Hello
 
I am using NLinq with ScriptDotNet very successfully but now I run into a problem.
 
This works:
 
query = @"from s in db where s.FiKey.Equals('MAN.DE') select new {s = s.BarQuote.Open, c = s.BarQuote.Close}";// ...test.AddSource("db", Db.AsQueryable<|EodQuote|>());
 

 
But this does not:
 
query = @"from s in db where s.FiKey.Equals(key) select new {s = s.BarQuote.Open, c = s.BarQuote.Close}";// ...
 
test.AddSource("db", Db.AsQueryable<|EodQuote|>());test.AddSource("key", "MAN.DE");
 

 
Can you tell me how to pass arguments for constraints?
 
Thanks
 
Christian Meier
 
PS using fresh new NLinq version 1.0

file attachments

Closed Aug 15, 2009 at 7:26 AM by sebastienros

comments

sebastienros wrote Aug 13, 2009 at 12:45 PM

I have attached the binaries which should resolve this issue. Please close this work item if it works, and i'll publish it.

cikic wrote Aug 13, 2009 at 7:48 PM

Error 8 'Evaluant.NLinq.Memory.LinqToMemory' does not contain a definition for 'AddSource' and no extension method 'AddSource' accepting a first argument of type 'Evaluant.NLinq.Memory.LinqToMemory' could be found (are you missing a using directive or an assembly reference?) C:\Dokumente und Einstellungen\cikic\Eigene Dateien\Visual Studio 10\Projects\fScriptEngine\libFObjectModel\src\Container\DtmQuery.cs 27 18 libFObjectModel

sebastienros wrote Aug 13, 2009 at 8:09 PM

Sorry, I have removed AddSource() and replaced it with SetParameter() as it can now handle any variable anywhere (in sources and constraints). Please try again with this new method.

cikic wrote Aug 14, 2009 at 5:13 AM

Oh yes, that works pretty fine.

Thank you!
Chris