Click here to Skip to main content
15,915,094 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have to call stored procedure with its Output parameter in C# LYNQ. I am having MVC application and also using LINQ to SQL in that.

Is there anyone who should have such approach then please suggest ?

Thanks.
Posted
Updated 25-Sep-13 2:40am
v2

 
Share this answer
 
If you are using Linq to Sql then it will be very easy you just need create a store p with a output parameter defined.After that simple drag your store p in .dbml file and call that store p you will simply get the value.

for eg

DataClassesDataContext db = new DataClassesDataContext();

     int a= db.usp_CheckBuyBookByISBN("9780199795352", null);

here i am calling a store p with name "usp_CheckBuyBookByISBN" this storep ask for two parameter and return you an interger value.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900