Using a function that returns XML

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I have a SQL scalar function that returns XML, and when executed via SSMS returns the data and xml structure I expect. However, when I execute this via LINQ to Entities I get nothing!
XElement m_Return = m_Entity.ExecuteStoreQuery<XElement>("SELECT dbo.XMLData({0});", 1).Single();
If I then use:
m_Return.Save("xmldata.xml") ;
I get :
<?xml version="1.0" encoding="utf-8"?><br/>
<default />
Needless to say this is not what I expected. I know its not an excuse, but I am very new to C# and LINQ so I am fairly confident that I am doing something wrong. But what I do not know, your help on this would be appreciated.
<hr class="sig Moo

View the full article
 
Back
Top