mirror of
https://github.com/DapperLib/Dapper.git
synced 2026-10-29 05:10:10 +08:00
1.33: SqlGeometry (core) and DbGeometry (EF) support
This commit is contained in:
@@ -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")]
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user