@@ -105,19 +105,23 @@ private Dictionary<string, string> BuildSelfLink(string protocol, string host, s
105105 } ;
106106 }
107107
108- private Dictionary < string , string > GetRelationshipLinks ( IJsonApiResource resource , string relationshipName )
108+ private Dictionary < string , Dictionary < string , string > > GetRelationshipLinks ( IJsonApiResource resource , string relationshipName )
109109 {
110110 return BuildRelationshipLinks ( _context . HttpContext . Request . Scheme ,
111111 _context . HttpContext . Request . Host . ToString ( ) , _context . Configuration . Namespace ,
112112 _context . GetEntityName ( ) , resource . Id , relationshipName ) ;
113113 }
114114
115- private Dictionary < string , string > BuildRelationshipLinks ( string protocol , string host , string nameSpace , string resourceCollectionName , string resourceId , string relationshipName )
115+ private Dictionary < string , Dictionary < string , string > > BuildRelationshipLinks ( string protocol , string host , string nameSpace , string resourceCollectionName , string resourceId , string relationshipName )
116116 {
117- return new Dictionary < string , string >
117+ return new Dictionary < string , Dictionary < string , string > >
118118 {
119- { "self" , $ "{ protocol } ://{ host } /{ nameSpace } /{ resourceCollectionName } /{ resourceId } /relationships/{ relationshipName } "} ,
120- { "related" , $ "{ protocol } ://{ host } /{ nameSpace } /{ resourceCollectionName } /{ resourceId } /{ relationshipName } "}
119+ {
120+ "links" , new Dictionary < string , string > {
121+ { "self" , $ "{ protocol } ://{ host } /{ nameSpace } /{ resourceCollectionName } /{ resourceId } /relationships/{ relationshipName } "} ,
122+ { "related" , $ "{ protocol } ://{ host } /{ nameSpace } /{ resourceCollectionName } /{ resourceId } /{ relationshipName } "}
123+ }
124+ }
121125 } ;
122126 }
123127 }
0 commit comments