-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels