You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/EFCore.SqlServer.Abstractions/HierarchyId.cs
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
4
usingSystem.Diagnostics.CodeAnalysis;
5
+
usingSystem.Text;
5
6
usingSystem.Text.Json.Serialization;
6
7
usingMicrosoft.EntityFrameworkCore.Internal;
7
8
usingMicrosoft.SqlServer.Types;
@@ -25,7 +26,7 @@ public HierarchyId()
25
26
}
26
27
27
28
/// <summary>
28
-
/// Initializes a new instance of the<see cref="HierarchyId" /> class. Equivalent to <see cref="Parse" />.
29
+
/// Initializes a new instance of the<see cref="HierarchyId" /> class. Equivalent to <see cref="Parse(string?)" />.
29
30
/// </summary>
30
31
/// <param name="value">The string representation of the node.</param>
31
32
publicHierarchyId(stringvalue)
@@ -63,6 +64,35 @@ public static HierarchyId GetRoot()
63
64
publicstaticHierarchyId?Parse(string?input)
64
65
=>(HierarchyId?)SqlHierarchyId.Parse(input);
65
66
67
+
/// <summary>
68
+
/// Converts the <paramref name= "parentHierarchyId" /> and <paramref name= "parentId" /> of a node to a <see cref="HierarchyId" /> value.
69
+
/// </summary>
70
+
/// <param name="parentHierarchyId">The parent HierarchyId of node.</param>
71
+
/// <param name="parentId">The parent Id of current node. It can be more than one element if want have path like: "/1/2/3.1/", otherwise one element for have path like: "/1/2/3/".</param>
0 commit comments