Skip to content

Commit 985342f

Browse files
committed
improve documentation
1 parent 11b0cc2 commit 985342f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/JsonApiDotNetCore/Internal/ContextGraph.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ public interface IContextGraph
1818
/// <code>
1919
/// _graph.GetRelationship(todoItem, nameof(TodoItem.Owner));
2020
/// </code>
21+
/// </example>
2122
/// <remarks>
22-
/// This method will not work with HasManyThrough relationships.
23-
/// You should instead use the <see cref="GetRelationshipValue" /> method instead.
23+
/// In the case of a `HasManyThrough` relationship, it will not traverse the relationship
24+
/// and will instead return the value of the shadow property (e.g. Articles.Tags).
25+
/// If you want to traverse the relationship, you should use <see cref="GetRelationshipValue" />.
2426
/// </remarks>
25-
/// </example>
2627
object GetRelationship<TParent>(TParent resource, string propertyName);
2728

2829
/// <summary>
29-
/// Gets the value of the navigation property, defined by the relationshipName,
30+
/// Gets the value of the navigation property (defined by the <see cref="RelationshipAttribute" />)
3031
/// on the provided instance.
32+
/// In the case of `HasManyThrough` relationships, it will traverse the through entity and return the
33+
/// value of the relationship on the other side of a join entity (e.g. Articles.ArticleTags.Tag).
3134
/// </summary>
3235
/// <param name="resource">The resource instance</param>
3336
/// <param name="relationship">The attribute used to define the relationship.</param>

0 commit comments

Comments
 (0)