C# Using mapper to map a DataReader to an object
<p>I've been struggling with getting ExpressMapper to map from a DataReader to a object (basically, Sqlite Rows -> Objects) . I've had success with AutoMapper, but found some other issues that got me looking for another map tool.</p>

<p>In AutoMapper I used the following code, but in ExpressMapper all string properties are NULL and the long prop is always 0, this indicates that the mapping is failing. Tried to look some examples for ExpressMapper but did not found any. Can you help? 
Also, are there any other mappers besides AutoMapper (and possibly ExpressMapper) that can help me achieve this scenario?</p>

<p>Thanks!</p>

<pre><code> public class ImportedFiles
{
    public Int64 Id { get; set; }
    public String FileName { get; set; }
    public String Hash { get; set; }

    public ImportedFiles()
    {

    }

}

private static void ReadImportedFiles()
    {
        var lst = ReadData&lt;ImportedFiles&gt;("SELECT * FROM ImportedFiles").ToList();
    }

 public static IEnumerable&lt;T&gt; ReadData&lt;T&gt;(string queryString)
        {
            using (var connection = new SQLiteConnection(ConnectionBuilder.ConnectionString))
            {
                connection.Open();
                using (var cmd = connection.CreateCommand())
                {
                    cmd.CommandText = queryString;
                    using (var reader = cmd.ExecuteReader())
                        if (reader.HasRows)
                            while (reader.Read())
                                yield return Mapper.Map&lt;IDataRecord, T&gt;(reader);
                }
            }
        }
</code></pre>