LINQ with Stored Procedures for XML Raw
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开发者_JAVA百科
...
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.
How about just calling that sproc the normal way (XmlReader or blob return)? LINQ won't do anything with it anyway.
精彩评论