title: Entity framework calling a FOR XML stored procedure truncates at 2033 characters
body: <p>I have a stored procedure which uses a FOR XML statement at the end of it, and returns me some XML.</p>
  
  <p>I am using .NET 4 and the Entity Framework and when I do a function import of this stored procedure and try to call it through the Entity Framework it truncates the return at 2033 characters. </p>
  
  <p>I swapped the Entity Framework for a traditional ADO.NET approach to call the stored procedure which had the same problem - truncated at 2033 characters - which is when I came across the following MSDN article explaining this is by-design and to use the "ExecuteXMLReader" method to overcome it:</p>
  
  <p><a href="http://support.microsoft.com/kb/310378" rel="noreferrer">http://support.microsoft.com/kb/310378</a></p>
  
  <p>So this is working now as a temporary fix but I'd like to use Entity Framework function imports so I've not got ADO.NET code mixed up with EF code.</p>
  
  <p>Is there some way I can use function imports in EF, return the XML and overcome the 2033 character limit?</p>
  
  <p>Regards<br>
    bgs264</p>