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

Merge pull request #141 from mkonstan/master

It does not look like we need above if since we are typecasting value to...
......@@ -42,6 +42,7 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Dapper NET40\Properties\AssemblyInfo.cs">
......
......@@ -42,6 +42,7 @@
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<Compile Include="SqlMapper.cs" />
......
......@@ -1420,10 +1420,7 @@ private static IEnumerable<T> QueryImpl<T>(this IDbConnection cnn, CommandDefini
while (reader.Read())
{
object val = func(reader);
if (effectiveType == typeof(object))
{
yield return (T)(object)val;
} else if (val == null || val is T) {
if (val == null || val is T) {
yield return (T)val;
} else {
yield return (T)Convert.ChangeType(val, effectiveType, CultureInfo.InvariantCulture);
......
......@@ -40,6 +40,7 @@
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Dapper NET40\Properties\AssemblyInfo.cs">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册