示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="reader"></param>
 /// <param name="dbFields"></param>
 /// <param name="dbSetting"></param>
 /// <returns></returns>
 internal static Func <DbDataReader, dynamic> GetDataReaderToExpandoObjectCompileFunction(DbDataReader reader,
                                                                                          IEnumerable <DbField> dbFields = null,
                                                                                          IDbSetting dbSetting           = null) =>
 DataReaderToExpandoObjectCache.Get(reader, dbFields, dbSetting);
示例#2
0
 /// <summary>
 /// Gets a compiled function that is used to convert the <see cref="DbDataReader"/> object into a list of dynamic objects in an asynchronous way.
 /// </summary>
 /// <param name="reader">The <see cref="DbDataReader"/> to be converted.</param>
 /// <param name="tableName">The name of the target table.</param>
 /// <param name="connection">The used <see cref="IDbConnection"/> object.</param>
 /// <param name="transaction">The transaction object that is currently in used.</param>
 /// <returns>A compiled function that is used to convert the <see cref="DbDataReader"/> object into a list of dynamic objects.</returns>
 internal static Task <Func <DbDataReader, ExpandoObject> > GetDataReaderToExpandoObjectCompileFunctionAsync(DbDataReader reader,
                                                                                                             string tableName,
                                                                                                             IDbConnection connection,
                                                                                                             IDbTransaction transaction) =>
 DataReaderToExpandoObjectCache.GetAsync(reader, tableName, connection, transaction);