private static IHypermediaBuilder <TDocument> DoAddRouteLink <TDocument>(IHypermediaBuilder <TDocument> builder, string rel, string routeName)
            where TDocument : IHypermediaDocument
        {
            var link = builder.Service.GetLink(LinkRequestBuilder
                                               .CreateWithRouteName(routeName));

            builder.AddLink(rel, link);

            return(builder);
        }
 public Link GetLink()
 {
     return(DoGetLink(LinkRequestBuilder
                      .CreateWithRouteName(urlHelper.Value.ActionContext.ActionDescriptor.AttributeRouteInfo.Name)
                      .SetRouteValuesIfNotNull(ConvertToRouteValues(urlHelper.Value.ActionContext.HttpContext.Request.Query))));
 }