Esempio n. 1
0
        /// <summary>
        /// Executes the specified SQL command text and binds the rows selected
        /// to an enumerable list of the specified type.
        /// </summary>
        /// <typeparam name="T">Result element type.</typeparam>
        /// <param name="context">A SQL command context which includes a SELECT command.</param>
        /// <param name="cancel">A token to monitor for cancellation requests.</param>
        /// <returns>The result of the SQL command.</returns>
        internal Task <IEnumerable <T> > ExecuteListResultAsync <T>(IContext context, CancellationToken cancel)
        {
            var processor = new ListResultProcessor <T>();

            return(RunCommandAsync <IEnumerable <T> >(context, processor, cancel));
        }
Esempio n. 2
0
        /// <summary>
        /// Executes the specified SQL command text and binds the rows selected
        /// to an enumerable list of the specified type.
        /// </summary>
        /// <typeparam name="T">Result element type.</typeparam>
        /// <param name="context">A SQL command context which includes a SELECT command.</param>
        /// <returns>The result of the SQL command.</returns>
        internal IEnumerable <T> ExecuteListResult <T>(IContext context)
        {
            var processor = new ListResultProcessor <T>();

            return(RunCommand <IEnumerable <T> >(context, processor));
        }