views:

127

answers:

1

I am new to LINQ. I would like to execute a stored proc using LINQ and output to an XML file. How would I go about this?

DataContext db = new DataContext();
var mysp = db.sp;

now what, I want to keep the xml structure in the sp, currently I am running the sp without for XML auto, but my ideal results are with for XML auto in the proc.

Thanks in advance

+1  A: 

Hope this helps http://www.vsj.co.uk/xml/display.asp?id=636

zapping
Thank you SO much, that is exactly what I was looking for. Specifically ther section: LINQ to SQL and LINQ to XML most examples I found didn't use a stored proc.
James Campbell