/// <summary> /// Builds a ResourceReference from a DocumentReference to add to related field in the response. /// </summary> /// <param name="documentReference">The DocumentReference to relate to.</param> /// <returns>Returns a new ResourceReference mapped from the provided DocumentReference.</returns> public static ResourceReference RelatedToDocumentReference(DocumentReference documentReference) { string transactionId = documentReference !.MasterIdentifier.Value; ResourceReference reference = new ResourceReference(transactionId); reference.Type = documentReference.GetType().Name; return(reference); }