I am working on a project to convert a large VB6 application to .NET. I decided to create a project to provide a facade to the existing VB6 ADO code, where I am using the am
After testing, I see that Dapper does indeed support pulling the XML from stored procedures.
var result = conn.Query<string>(@"select * from <someTable> for xml auto");
This will return an array of string with each element containing up to 2,033 characters, which you can simple join to have your result as a single string.
var fullResult = string.Join("", result);
or
var fullResult = string.Concat(result);
or, all in one step:
var result = string.Concat(conn.Query<string>(
@"select * from <someTable> for xml auto", buffered: false));
So, there is no need for me to implement ExcuteXmlReader method myself, and now I can let Dapper handle the parameters normally.