Here is a test that reproduces it:
public void TestDecimalSelect()
{
using (var connection = Program.GetOpenConnection())
{
connection.Execute("select cast(0.090 as decimal(5, 3)) test into tmp_test");
var query = connection.Query<DecimalObj>("select top 1 test from tmp_test");
decimal result = query.First().result;
connection.Execute("drop table tmp_test");
result.IsEqualTo(0.090m);
}
}
class DecimalObj
{
public decimal result { get; set; }
}
If you use connection.Query<decimal> without the object it works, and if if you
select the decimal without the temporary table it also works. But querying
from a real table into an object with a decimal results in 0 being returned
instead of 0.090.
Original issue reported on code.google.com by shook.di...@gmail.com on 14 Jun 2013 at 3:40
Original issue reported on code.google.com by
shook.di...@gmail.com
on 14 Jun 2013 at 3:40