I have a number of places in my code where I render links from templates like so:
<a href="@(Model.Link == null ? string.Empty : Model.Link.Url)">@Model.Link.Text</a>
However I've realized that this leaves off any querystring that is set on the link. I know that I can add this manually by doing
href="@(Model.Link == null ? string.Empty : Model.Link.Url + "?" + Model.Link.Query)" but is there a simpler way to just get the full link url and querystring, without having to explicitly include the query everywhere in my code?