Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# .NET中的Ibatis:从sqlmap获取sql作为字符串?_C#_Sql_Ibatis_Ibatis.net - Fatal编程技术网

C# .NET中的Ibatis:从sqlmap获取sql作为字符串?

C# .NET中的Ibatis:从sqlmap获取sql作为字符串?,c#,sql,ibatis,ibatis.net,C#,Sql,Ibatis,Ibatis.net,可以在sqlmap中以字符串形式获取sql吗?似乎有办法 所以我有一个类似这样的sqlmap: <?xml version="1.0" encoding="utf-8" ?> <sqlMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ibatis.apache.org/mapping" namespace="PersonSqlMap"> &

可以在sqlmap中以字符串形式获取sql吗?似乎有办法

所以我有一个类似这样的sqlmap:

<?xml version="1.0" encoding="utf-8" ?>

<sqlMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://ibatis.apache.org/mapping"
        namespace="PersonSqlMap">

  <statements>
    <select id="GetPersonByName" parameterClass="string" resultClass="Person">
      select * from PERSON P where P.Name = #Name#
    </select>
  </statements>

</sqlMap>
在c代码中,我想从PERSON p获得select*,其中p.Name=Name