File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
src/JsonApiDotNetCore/Models Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ namespace JsonApiDotNetCore . Models
2
+ {
3
+ public class HasManyAttribute : RelationshipAttribute
4
+ {
5
+ public HasManyAttribute ( string publicName )
6
+ : base ( publicName )
7
+ {
8
+ PublicRelationshipName = publicName ;
9
+ }
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ namespace JsonApiDotNetCore . Models
2
+ {
3
+ public class HasOneAttribute : RelationshipAttribute
4
+ {
5
+ public HasOneAttribute ( string publicName )
6
+ : base ( publicName )
7
+ {
8
+ PublicRelationshipName = publicName ;
9
+ }
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+
3
+ namespace JsonApiDotNetCore . Models
4
+ {
5
+ public class RelationshipAttribute : Attribute
6
+ {
7
+ protected RelationshipAttribute ( string publicName )
8
+ {
9
+ PublicRelationshipName = publicName ;
10
+ }
11
+
12
+ public string PublicRelationshipName { get ; set ; }
13
+ public string InternalRelationshipName { get ; set ; }
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments