public string GetLink(IHyperMediaItem obj, string linkType) { if (obj.Links == null) { throw new HyperMediaFactoryLinksNullException(); } var link = obj.Links.FirstOrDefault(x => x.Rel == linkType); if (link == null) { throw new HyperMediaFactoryLinksNotFoundException(); } return(link.Href); }
public string GetLink(IHyperMediaItem obj, string linkType) { if (obj.Links == null) { throw new HyperMediaFactoryLinksNullException(); } var link = obj.Links.FirstOrDefault(x => x.Rel == linkType); if (link == null) { throw new HyperMediaFactoryLinksNotFoundException(); } return link.Href; }