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.