views:

80

answers:

2

Im using Linq to SQL I have a stored procedure that is returning xml . ie im using for xml outo ,elements

that works fine. what I want to do is expose the result of the stored procedure via a webservice.

Here is some pseudo code: if some could help me replace the ?'s

[WebMethod]
public ?  myMethod( int custID)
{
    var myCust = db.getCustomer(custID) ;

    return ?
}
A: 

You can return either XmlElement or XElement.

John Saunders
A: 

my issue was it was a stored proc returning a xml data set,

the solution is extremely simple I simply created a List

and returned it. I was kind of surprised because i assumed List<> needed a defined class. it just used the result set so Im pretty happy. now if someone could point me in the right direction so I could edit the contents of the List< > to replace the name of the parent tags I'd be super happy.