/// <summary> /// An extension method for the <see cref="IDataRowProvider"/>. Used to perform a lookup with the <see cref="IDataRowProvider"/> interface. If the lookup produces no results, the operation is deemed a failure with the <see cref="DataAccess.EmptyResultSetException"/> Exception. If the operation fails, the incoming Type, and method name will added to Exception. /// </summary> /// <typeparam name="T">The type of object represented by the lookup.</typeparam> /// <param name="dataRowProvider">The <see cref="IDataRowProvider"/> used to submit query.</param> /// <param name="dataOrder">The information for the query.</param> /// <param name="converter">A callback used to convert the combination of the <see cref="DataRow"/>, and the <see cref="IAliasedCommandTypeDataOrder"/> into an object of type T.</param> /// <param name="declaringTypeCallback">The callback to define the type to be added to the <see cref="Utilities.OperationResult{T}"/> if faulted.</param> /// <param name="callingMethod">The callback to define the type to be added to the <see cref="Utilities.OperationResult{T}"/> if faulted.</param> /// <returns>A <see cref='Task'/> with a result of <see cref="Utilities.OperationResult{T}"/> containing result upon success, and Exceptions upon failure.</returns> public static Task <OperationResult <T> > LookupAsync <T>(this IDataRowProvider dataRowProvider, IAliasedCommandTypeDataOrder dataOrder, Func <IAliasedCommandTypeDataOrder, DataRow, T> converter, Func <Type> declaringTypeCallback, string callingMethod) => dataRowProvider.LookupAsync <T, T>(dataOrder, converter, declaringTypeCallback, callingMethod);
/// <summary> /// An extension method for the <see cref="IDataRowProvider"/>. Used to perform a lookup with the <see cref="IDataRowProvider"/> interface. If the lookup produces no results, the operation is deemed a failure with the <see cref="DataAccess.EmptyResultSetException"/> Exception. /// </summary> /// <typeparam name="T">The type of object represented by the lookup.</typeparam> /// <param name="dataRowProvider">The <see cref="IDataRowProvider"/> used to submit query.</param> /// <param name="dataOrder">The information for the query.</param> /// <param name="converter">A callback used to convert the combination of the <see cref="DataRow"/>, and the <see cref="IAliasedCommandTypeDataOrder"/> into an object of type T.</param> /// <returns>A <see cref='Task'/> with a result of <see cref="Utilities.OperationResult{T}"/> containing result upon success, and Exceptions upon failure.</returns> public static Task <OperationResult <T> > LookupAsync <T>(this IDataRowProvider dataRowProvider, IAliasedCommandTypeDataOrder dataOrder, Func <IAliasedCommandTypeDataOrder, DataRow, T> converter) => dataRowProvider.LookupAsync <T, T>(dataOrder, converter);