EDN Admin
Well-known member
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
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