提交 c3beb607 编写于 作者: M Marc Gravell

Test for #524 (believed to be a failing test; cannot validate or fix until I...

Test for #524 (believed to be a failing test; cannot validate or fix until I get the latest tooling installed)
上级 2c531d2c
......@@ -135,5 +135,21 @@ select @b
var retVal = p.Get<int>("RetVal");
retVal.IsEqualTo(3);
}
[Fact]
public void Issue524_QueryMultiple_Cast()
{ // aka: Read<int> should work even if the data is a <long>
// using regular API
connection.Query<int>("select cast(42 as bigint)").IsEqualTo(42);
connection.QuerySingle<int>("select cast(42 as bigint)").IsEqualTo(42);
// using multi-reader API
using(var reader = connection.QueryMultiple("select cast(42 as bigint); select cast(42 as bigint)"))
{
reader.Read<int>().Single().IsEqualTo(42);
reader.ReadSingle<int>().IsEqualTo(42);
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册