If all you need is a parm collection, you can try a helper method that creates a deep copy of the .parameters collection in your command. See if it will spit out what you are looking for.
I canβt take credit for the ObjectCopier method, itβs just a useful base class method that I got from a previous project.
private DbParameterCollection cloneParms(DbCommand commandWithParms) { return ObjectCopier.Clone<DbParameterCollection>(commandWithParms.Parameters); } public static class ObjectCopier {
Tj kellie
source share