/// <summary>
        /// Maps the results of the <paramref name="query"/> to dynamic objects.
        /// The query is deferred-executed.
        /// </summary>
        /// <param name="query">The query.</param>
        /// <returns>The results of the query as dynamic objects.</returns>
        /// <seealso cref="Extensions.Map(IDbCommand, TextWriter)"/>
        public IEnumerable <dynamic> Map(SqlBuilder query)
        {
            var mapper = new DynamicMapper {
                Log = this.Log
            };

            return(Extensions.Map <dynamic>(CreateCommand, query, mapper, this.Log));
        }
Esempio n. 2
0
 /// <summary>
 /// Maps the results of the <paramref name="query"/> to objects of type
 /// specified by the <paramref name="resultType"/> parameter.
 /// The query is deferred-executed.
 /// </summary>
 /// <param name="query">The query.</param>
 /// <inheritdoc cref="Extensions.Map(IDbCommand, Type)"
 ///             select="*[not(self::param/@name='command')]"/>
 /// <seealso cref="Extensions.Map(IDbCommand, Type, TextWriter)"/>
 public IEnumerable <object> Map(Type resultType, SqlBuilder query)
 {
     return(Extensions.Map <object>(CreateCommand, query, CreatePocoMapper(resultType), this.Log));
 }
Esempio n. 3
0
 /// <summary>
 /// Maps the results of the <paramref name="query"/> to <typeparamref name="TResult"/> objects.
 /// The query is deferred-executed.
 /// </summary>
 /// <param name="query">The query.</param>
 /// <inheritdoc cref="Extensions.Map&lt;T>(IDbCommand)"
 ///             select="*[not(self::param/@name='command')]"/>
 /// <seealso cref="Extensions.Map&lt;T>(IDbCommand, TextWriter)"/>
 public IEnumerable <TResult> Map <TResult>(SqlBuilder query)
 {
     return(Extensions.Map <TResult>(CreateCommand, query, CreatePocoMapper(typeof(TResult)), this.Log));
 }