In MicroLite 5.0, we have enhanced the Type Converters which we introduced in MicroLite 3.1.
The following method has been added to the interface:
object ConvertFromDbValue(IDataReader reader, int index, Type type);
This allows you to read the value from the IDataReader at the given
index in the most efficient way (e.g. as an
Int32 without the value being boxed).
From MicroLite 5.0, the full interface now looks like this:
ConvertFromDbValue(IDataReader, int, Type) is called when building an object from the results of a query, the
ConvertFromDbValue(object, Type) method still exists but is only used when using
ISession.Advanced.ExecuteScalar as there is no data reader used for that operation.