Commit 5472d2ab authored by Marc Gravell's avatar Marc Gravell

1.34: Support for SqlHierarchyId (core)

parent 62bdcd1b
......@@ -32,5 +32,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.33.0.0")]
[assembly: AssemblyFileVersion("1.33.0.0")]
[assembly: AssemblyVersion("1.34.0.0")]
[assembly: AssemblyFileVersion("1.34.0.0")]
......@@ -847,6 +847,9 @@ internal static DbType LookupDbType(Type type, string name, out ITypeHandler han
case "Microsoft.SqlServer.Types.SqlGeometry":
AddTypeHandler(type, handler = new UdtTypeHandler("GEOMETRY"));
return DbType.Object;
case "Microsoft.SqlServer.Types.SqlHierarchyId":
AddTypeHandler(type, handler = new UdtTypeHandler("HIERARCHYID"));
return DbType.Object;
}
throw new NotSupportedException(string.Format("The member {0} of type {1} cannot be used as a parameter value", name, type));
}
......
......@@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.33.0.0")]
[assembly: AssemblyFileVersion("1.33.0.0")]
[assembly: AssemblyVersion("1.34.0.0")]
[assembly: AssemblyFileVersion("1.34.0.0")]
......@@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.33.0.0")]
[assembly: AssemblyFileVersion("1.33.0.0")]
[assembly: AssemblyVersion("1.34.0.0")]
[assembly: AssemblyFileVersion("1.34.0.0")]
......@@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.33.0.0")]
[assembly: AssemblyFileVersion("1.33.0.0")]
[assembly: AssemblyVersion("1.34.0.0")]
[assembly: AssemblyFileVersion("1.34.0.0")]
......@@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.33.0.0")]
[assembly: AssemblyFileVersion("1.33.0.0")]
[assembly: AssemblyVersion("1.34.0.0")]
[assembly: AssemblyFileVersion("1.34.0.0")]
......@@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.33.0.0")]
[assembly: AssemblyFileVersion("1.33.0.0")]
[assembly: AssemblyVersion("1.34.0.0")]
[assembly: AssemblyFileVersion("1.34.0.0")]
......@@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.33.0.0")]
[assembly: AssemblyFileVersion("1.33.0.0")]
[assembly: AssemblyVersion("1.34.0.0")]
[assembly: AssemblyFileVersion("1.34.0.0")]
......@@ -3033,6 +3033,23 @@ public void SqlGeography_SO25538154()
row.Geometry.IsNotNull();
}
public void SqlHierarchyId_SO18888911()
{
Dapper.SqlMapper.ResetTypeHandlers();
var row = connection.Query<HazSqlHierarchy>("select 3 as [Id], hierarchyid::Parse('/1/2/3/') as [Path]").Single();
row.Id.Equals(3);
row.Path.IsNotNull();
var val = connection.Query<SqlHierarchyId>("select @Path", row).Single();
val.IsNotNull();
}
public class HazSqlHierarchy
{
public int Id { get; set; }
public SqlHierarchyId Path { get; set; }
}
public void TypeBasedViaDynamic()
{
Type type = GetSomeType();
......
......@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata schemaVersion="2">
<id>Dapper</id>
<version>1.33</version>
<version>1.34</version>
<title>Dapper dot net</title>
<authors>Sam Saffron,Marc Gravell</authors>
<owners>Sam Saffron,Marc Gravell</owners>
......@@ -19,6 +19,7 @@
<frameworkAssembly assemblyName="Microsoft.CSharp" targetFramework=".NETFramework4.0-Client, .NETFramework4.0" />
</frameworkAssemblies>
<releaseNotes>
* 1.34 - Support for SqlHierarchyId (core)
* 1.33 - Support for SqlGeometry (core) and DbGeometry (EF)
* 1.32 - Support for SqlGeography in core library
* 1.31 - Fix issue with error message when there is a column/type mismatch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment