开发者

Can write DAL parameter collection from stored procedure?

开发者 https://www.devze.com 2023-03-13 01:25 出处:网络
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

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消