title: Construct url in view for Web Api with attribute routing
body: <p>How can I get the url from web api in my view?</p>
  
  <p>Example (from the <a href="http://blogs.msdn.com/b/webdev/archive/2013/10/17/attribute-routing-in-asp-net-mvc-5.aspx" rel="noreferrer">msdn-blog</a>):</p>
  
  <pre><code>[RoutePrefix("reviews")]
  public class ReviewsController : ApiController
  {
      // eg.: /reviews
      [Route]
      public IHttpActionResult Get() { ... }
      // eg.: /reviews/5
      [Route("{reviewId}")]
      public IHttpActionResult Show(int reviewId) { ... }
      // eg.: /reviews/5/edit
      [Route("{reviewId}/edit")]
      public IHttpActionResult Edit(int reviewId) { ... }
  }
  </code></pre>
  
  <p>Now I want to construct "/reviews/edit" in my view, how can I do this?</p>
  
  <p>I've tried creating a little extension method, but it requires me to give every route an actual "RouteName". Is there a method I can use (like in MVC) where I can just pass the controller and action? </p>
  
  <pre><code>@Url.Action("Edit", "Reviews)
  </code></pre>
  
  <p>The method I'm using now (with RouteName) also doesn't allow me to use integers as parameters (unless I pass a default value). If I do need to name all my routes, how can I create a route url, but pass my parameters in the "data"-portion of my request?</p>
  
  <p>Current method:</p>
  
  <pre><code>public static string ResolveWebApiRoute(this UrlHelper urlHelper, string routeName, object routeValues = null)
  {
      var newRouteValues = new RouteValueDictionary(routeValues);
      newRouteValues.Add("httproute", true);
  
      return urlHelper.RouteUrl(routeName, newRouteValues);
  }
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>When I used methods like <code>Url.RouteUrl(new { controller = ..., action = ...})</code>, It redirects directly to that action (e.g. <code>new { controller = "Reviews", action = "Show"} --&gt; /reviews/show</code>, whilest I want it to redirect to <code>/reviews/...</code></p>