I'm using ADO.NET to communicate some db, and searching for a way to avoid boxing when setting the DbParameter.Value property to value-type.
Is there a way to avoid boxing in DbParameter.Value?
Thanks.
Why do you want to avoid it? The performance cost of boxing is probably next to nothing in the context of the overall data access layer. Serializing the parameter value on the wire alone is probably 100 times the cost of boxing. Are you seeing a performance problem attributable to boxing?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With