Home  /  Questions  /  Question



65   95.8
May 07, 2011


How to use stored procedures with Design Pattern Framework?

Hello,

In the ADO.NET part of your Design Pattern Framework the sql is created inline and sent to the database.

I am using Stored Procedures.  How do I make a generic method to pass just the stored procdure name and parameters required for those procedures in the Db.cs class in the data access layer?

I look forward to some coding guidance.

Thanks.






270   99.7
May 12, 2011
You need to change the functions of Db.cs file, Instead of passing the string sql as parameter pass the storedprocedure name,
& set the command.CommandType as storedprocedure.

65   95.8
May 16, 2011
Thanks...Will try that and get back if i am stuck anywhere.