iBatis for .NET
  1. iBatis for .NET
  2. IBATISNET-272

Add QueryForDataTable method on DataMapper API

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: DataMapper 3.0
    • Fix Version/s: DataMapper 3.0
    • Component/s: DataMapper
    • Labels:
      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>

        Activity

        Gilles Bayon created issue -
        Hide
        Gilles Bayon added a comment -

        In SVN
        DataTable object can be used as a 'generic' DTO with dynamic property

        Show
        Gilles Bayon added a comment - In SVN DataTable object can be used as a 'generic' DTO with dynamic property
        Gilles Bayon made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Gilles Bayon added a comment -

        After Ron remarks and a refactoring phase , used "datarow" or "data" or "row" as type alias (buil-in ibatis)

        Show
        Gilles Bayon added a comment - After Ron remarks and a refactoring phase , used "datarow" or "data" or "row" as type alias (buil-in ibatis)

          People

          • Assignee:
            Gilles Bayon
            Reporter:
            Gilles Bayon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved:

              Development