var sql = @"select count(1) from Products;
select * from Products order by ProductId asc limit @ItemsPerPage Offset @Offset";
using (var multi = _db.Connection.QueryMultiple(sql, new { ItemsPerPage = page.ItemsPerPage, Offset = (page.CurrentPage - 1) * page.ItemsPerPage }))
{
var totalitems = multi.Read<int>().Single();
var data = multi.Read<Product>().ToList();
}
Above is wrong. and push a `System.InvalidCastException'
If I change the following way ,it's correct ?
var totalitems = multi.Read<Int64>().Single();
Is a Bug ?
However, the query does not have this problem.
Above is wrong. and push a `System.InvalidCastException'
If I change the following way ,it's correct ?
Is a Bug ?
However, the query does not have this problem.