Using a clone to prevent an error if the param is a SqlParameter, #272
Using a clone to prevent an error if the param is a SqlParameter, #272dcrafti wants to merge 1 commit intoCollaboratingPlatypus:masterfrom
Conversation
…her than a value type. The error is "The SqlParameter is already contained by another SqlParameterCollection"
|
Hi @dcrafti, thanks for the contribute. You're missing unit/integration tests to confirm the problem and the fix. Also, if I understand this correctly, you're reusing SqlParameters in the multiple calls to PetaPoco? If so would the clone call be better placed in your code? |
|
The issue that the code fixes is that if there is sql passed into PetaPoco If you want to replicate the broken behaviour, try running something like On Tue, 29 Mar 2016 at 12:34 Wade Baglin [email protected] wrote:
|
|
No worries. When I get time I'll investigate and write a few integration tests the prove the bug |
|
@kurda-kurda I'm going to delete your comment, because it's not related to PetaPoco. If you have a question about general |
...rather than a value type.
The error is "The SqlParameter is already contained by another SqlParameterCollection"