Is there some way that I can get parameter collection code in C# to be used in DAL by runn开发者_如何学运维ing a stored procedure ? please help.
Take a look at SqlCommandBuilder.DeriveParameters()
. ( It also works in the latest Oracle drivers )
It will load the parameters from the stored procedure into the .Parameters
property of your DbCommand object and you can foreach()
to loop through them to get the names, types, and directions...
Hope that's what you were looking for...
精彩评论