Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
DataMapper 3.0
-
None
Description
/// <summary>
/// Executes a SQL SELECT statement that returns data
/// to populate a DataTable.
/// If a resultMap is specified, the column name will be the result property name.
/// </summary>
/// <param name="statementId">The statement id.</param>
/// <param name="parameterObject">The parameter object.</param>
/// <returns>A DataTable</returns>
public DataTable QueryForDataTable(string statementId, object parameterObject)
Specify "dataTable" or "data" as type alias (buil-in ibatis)
<resultMap id="Account-result-DataTable" class="dataTable">
<result property="Id" column="Account_ID"/>
<result property="FirstName" column="Account_FirstName"/>
</resultMap>
<select id="SimpleAccountDataTableViaResultMap" parameterClass="int" resultMap="Account-result-DataTable">
select *
from Accounts
</select>
<select id="SimpleAccountDataTable" parameterClass="int" resultClass="data">
select *
from Accounts
</select>