views:

45

answers:

3

I am new to LINQ and trying to learn it. I have a stored proc which returns XML Raw and I need to call this proc using VB.NET and LINQ...

A: 

here is the aricle which shows how to call procedure from linq : http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx

As given in article :

  • step 1 : Drag and drop your procedure in your dbml file from server explorer window.
  • Step 2 : it automatically create a new method on our LINQ to SQL DataContext class
  • step 3 : then by datacontext class call the that function.

if the procedure contains any out parameter it creates ref parameter in method generated by designer. to call that method by dbcontext calss you have to pass one ref pameter to that method.

Pranay Rana
I have gone through it already, but cant find out how it is actually done. Can you explain the main steps and the return type in the DBML properties etc..
A: 

I hope this video can help you

http://technorati.com/videos/youtube.com%2Fwatch%3Fv%3Dt8rbLhnR8B4

You see there from and where stored procedures are dragged to

Patrick Säuerl
A: 

How about just calling that sproc the normal way (XmlReader or blob return)? LINQ won't do anything with it anyway.

ZXX