1.33: SqlGeometry (core) and DbGeometry (EF) support

This commit is contained in:
Marc Gravell
2014-08-28 09:53:16 +01:00
parent 54bc52b306
commit 62bdcd1bb2
17 changed files with 93 additions and 65 deletions
+2 -2
View File
@@ -32,5 +32,5 @@ using System;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.32.0.0")]
[assembly: AssemblyFileVersion("1.32.0.0")]
[assembly: AssemblyVersion("1.33.0.0")]
[assembly: AssemblyFileVersion("1.33.0.0")]
+7 -4
View File
@@ -839,11 +839,14 @@ namespace Dapper
{
return DbType.Object;
}
if(type.FullName == "Microsoft.SqlServer.Types.SqlGeography")
switch (type.FullName)
{
handler = new UdtTypeHandler("GEOGRAPHY");
AddTypeHandler(type, handler);
return DbType.Object;
case "Microsoft.SqlServer.Types.SqlGeography":
AddTypeHandler(type, handler = new UdtTypeHandler("GEOGRAPHY"));
return DbType.Object;
case "Microsoft.SqlServer.Types.SqlGeometry":
AddTypeHandler(type, handler = new UdtTypeHandler("GEOMETRY"));
return DbType.Object;
}
throw new NotSupportedException(string.Format("The member {0} of type {1} cannot be used as a parameter value", name, type));
}