I want to write a sql helper class for this.
my stored procedure,
Expand|Select|Wrap|Line Numbers
- CREATE PROCEDURE GetOrderDetails
- @OrderID int,
- @OrderLbl varchar(3),
- @OrderName nvarchar(40) OUTPUT,
- @UnitPrice money OUTPUT,
- AS
- SELECT @OrderName = OrderName,
- @UnitPrice = UnitPrice,
- FROM Orders
- WHERE OrderID = @OrderID and OrderMark = @OrderLbl
how can I write a C# class to execute such type of procedures and how to implement such classes.
I tried writing a function but do not have enough idea to start with.