Пример #1
0
 /// <summary>
 /// Gets a delegate that is used to convert the <see cref="DbDataReader"/> object into data entity object.
 /// </summary>
 /// <param name="reader">The <see cref="DbDataReader"/> to be converted.</param>
 /// <param name="basedOnFields">Check whether to create a delegate based on the data reader fields.</param>
 /// <returns>An instance of data entity object.</returns>
 internal static DataReaderToExpandoObjectDelegate GetDataReaderToExpandoObjectDelegate(DbDataReader reader, bool basedOnFields = false)
 {
     if (basedOnFields == false)
     {
         return(DataReaderToExpandoObjectDelegateCache.Get(reader));
     }
     else
     {
         return(FieldBasedDataReaderToExpandoObjectDelegateCache.Get(reader));
     }
 }
Пример #2
0
 /// <summary>
 /// Gets a delegate that is used to convert the <see cref="DbDataReader"/> object into data entity object.
 /// </summary>
 /// <param name="reader">The <see cref="DbDataReader"/> to be converted.</param>
 /// <returns>An instance of data entity object.</returns>
 public static DataReaderToExpandoObjectDelegate GetDataReaderToExpandoObjectDelegate(DbDataReader reader)
 {
     return(DataReaderToExpandoObjectDelegateCache.Get(reader));
 }