0
私はXmlReaderのwhithデータを取得します。それをASP.NET Core MVCのJSONに変換する方法は?例えばASP.NETのJSONからコアMVC
:
using (SqlCommand command = new SqlCommand("SELECT * FROM Sample for XML AUTO", connection as SqlConnection)){
XmlReader xml = command.ExecuteXmlReader();
xml.Read();
//convert xml.ReadOuterXml() to json
return new ObjectResult(json);
}