Comiple query that uses "Contains" - error: parameters cannot be sequences

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
HadleyHope
Posts: 8
Joined: Thu 24 Jan 2013 14:44

Comiple query that uses "Contains" - error: parameters cannot be sequences

Post by HadleyHope » Tue 19 Feb 2013 16:18

I am trying to compile a query that uses Contains

Code: Select all

   _getTradeDataQuery = CompiledQuery.Compile<TSDataContext, TradeDataParams,   IEnumerable<VwAvailProjTradeDataTrade>>(
   (context, dataKey) =>
   from trade in context.VwAvailProjTradeDataTrades
      where trade.CurrencyCode == dataKey.Currency
      && trade.PeriodType == dataKey.PeriodType
      && trade.NomenCode == dataKey.Nomenclature
      && trade.DigitLevel == dataKey.DigitLevel
      && dataKey.FlowTypes.Contains(trade.FlowType.Value)
      && dataKey.Reporters.Contains(trade.Reporter.Value)
      && dataKey.Partners.Contains(trade.Partner.Value)
      && dataKey.Years.Contains(trade.Year.Value)
   select trade);
But when I try and use the compiled query I always get the error: parameters cannot be sequences

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Comiple query that uses "Contains" - error: parameters cannot be sequences

Post by MariiaI » Wed 20 Feb 2013 13:55

Thank you for the report. We have reproduced this error. We will investigate it and inform you about the results as soon as possible.

Post Reply