Skip to content

Commit a5786d4

Browse files
committed
add convention based ctor for HasManyThroughAttribute
1 parent df30837 commit a5786d4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: src/JsonApiDotNetCore/Models/HasManyThroughAttribute.cs

+24
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ public class HasManyThroughAttribute : HasManyAttribute
1515
/// <summary>
1616
///
1717
/// </summary>
18+
///
19+
/// <param name="publicName">The relationship name as exposed by the API</param>
20+
/// <param name="internalThroughName">The name of the navigation property that will be used to get the HasMany relationship</param>
21+
/// <param name="documentLinks">Which links are available. Defaults to <see cref="Link.All"/></param>
22+
/// <param name="canInclude">Whether or not this relationship can be included using the <c>?include=public-name</c> query string</param>
23+
///
24+
/// <example>
25+
///
26+
/// </example>
27+
public HasManyThroughAttribute(string internalThroughName, Link documentLinks = Link.All, bool canInclude = true)
28+
: base(null, documentLinks, canInclude)
29+
{
30+
InternalThroughName = internalThroughName;
31+
}
32+
33+
/// <summary>
34+
///
35+
/// </summary>
36+
///
37+
/// <param name="publicName">The relationship name as exposed by the API</param>
38+
/// <param name="internalThroughName">The name of the navigation property that will be used to get the HasMany relationship</param>
39+
/// <param name="documentLinks">Which links are available. Defaults to <see cref="Link.All"/></param>
40+
/// <param name="canInclude">Whether or not this relationship can be included using the <c>?include=public-name</c> query string</param>
41+
///
1842
/// <example>
1943
///
2044
/// </example>

0 commit comments

Comments
 (0)