title: How to set this Area up in my ASP.NET MVC Application
body: <p>I'm trying to setup an Area Route in my ASP.NET MVC application.</p>
  
  <p>I'm also using the nuget package <a href="https://github.com/mccalltd/AttributeRouting/" rel="nofollow">AttributeRouting</a>, not the normal MVC register area routes thingy.</p>
  
  <p>From my understanding, area routes look like this : <code>/area/controller/method</code></p>
  
  <p>What I'm trying to do is :- <code>/api/search/index</code></p>
  
  <p>which means: </p>
  
  <ul>
  <li>Area => Api</li>
  <li>Controller => SearchController</li>
  <li>ActionMethod => Index</li>
  </ul>
  
  <p>.</p>
  
  <pre><code>[RouteArea("Api")]
  public class SearchController : Controller
  {
      [POST("Index")]
      public JsonResult Index(IndexInputModel indexInputModel) { .. }
  }
  </code></pre>
  
  <p>But that doesn't create that route. This is what it creates: <code>/api/index</code>
  The <code>search</code> controller is missing.</p>
  
  <p>I've had a <a href="http://attributerouting.net/#defining-routes" rel="nofollow">look the docs</a> and noticed the <code>RoutePrefix</code> so I tried this..</p>
  
  <pre><code>[RouteArea("Api")]
  [RoutePrefix("Search")]
  public class SearchController : Controller
  {
      [POST("Index")]
      public JsonResult Index(IndexInputModel indexInputModel) { .. }
  }
  </code></pre>
  
  <p>and that actually creates the route <code>/api/search/index</code>.</p>
  
  <p>But why do i need to put the <code>RoutePrefix</code> in there? Shouldn't it be smart enough to already figure out that this is a <code>SearchController</code> and create the 3-segment route?</p>