schotime / NPoco

Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco
Apache License 2.0
848 stars 302 forks source link

Reuse Parameters with LINQ-style queries #670

Open PeterN opened 2 years ago

PeterN commented 2 years ago

In SqlBuilder and ParameterHelper.ProcessParams there is the option to reuse parameters. When using LINQ-style queries, this is hidden away.

1) Is it possible to expose this? 2) Does reusing parameters cause issues anywhere? 3) If not can it just be done always?

Although actually after some testing, I've found that when using ToPageAsync, parameters are not reused in the main part of the query, but they are reused in the Count part, so I guess more needs to be done.