How to set more than 4 parameters in DataContext.Query()

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
ChrisT
Posts: 6
Joined: Mon 26 Feb 2018 16:05

How to set more than 4 parameters in DataContext.Query()

Post by ChrisT » Mon 26 Feb 2018 16:14

Hello,

how is it possible to set more than 4 parameters in method DataContext.Query<T>(stmt, ...)?

I need to call Query() with an array of parameters.

Is it possible?

Chris

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: How to set more than 4 parameters in DataContext.Query()

Post by Pinturiccio » Tue 27 Feb 2018 13:59

It is not possible to use an array of parameters in Query at the moment. We will investigate the possibility to support such feature and post here about the results.

ChrisT
Posts: 6
Joined: Mon 26 Feb 2018 16:05

Re: How to set more than 4 parameters in DataContext.Query()

Post by ChrisT » Mon 05 Mar 2018 08:07

Thanks. It would be very nice that this will be possible.

Now I have found a very tricky hack using Reflection.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: How to set more than 4 parameters in DataContext.Query()

Post by Shalex » Fri 30 Mar 2018 17:25

The behavior is changed: all existing overloads of the method DataContext.Query() are replaced with DataContext.Query(String,params Object[]). Refer to viewtopic.php?f=31&t=36965.

ChrisT
Posts: 6
Joined: Mon 26 Feb 2018 16:05

Re: How to set more than 4 parameters in DataContext.Query()

Post by ChrisT » Tue 03 Apr 2018 08:15

Thanks for your effort.
My problem is now solved.

Post Reply