title: Using Prefix property of BindAttribute to bind to single parameter
body: <p>I'm trying to bind a single parameter of a URL query to a single property in an action method. </p>
  
  <p>The URL is along the lines of:</p>
  
  <pre><code>/user/validate?Some.Prefix.Username=MyUserName
  </code></pre>
  
  <p>And my controller and action method are along the lines of:</p>
  
  <pre><code>public class UserController : Controller
  {
      public IActionResult Validate([Bind(Prefix = "Some.Prefix")]string username)
      {
          return Ok(username);
      }
  }
  </code></pre>
  
  <p>However the <code>username</code> parameter is always null when this action method is called. It seems this is a result of using the <code>BindAttribute</code> with a string parameter, rather than a simple class parameter. If I replace the <code>string username</code> parameter with a simple class containing a <code>Username</code> property, I can capture the value as expected. </p>
  
  <pre><code>public class UserController : Controller
  {
      public IActionResult Validate([Bind(Prefix = "Some.Prefix")]ValidationModel model)
      {
          return Ok(model);
      }
  }
  
  public class ValidationModel
  {
      public string Username { get; set; }
  }
  </code></pre>
  
  <hr>
  
  <p>Is there any way to bind to a single parameter (rather than a class parameter) when the URL parameter name contains prefixes?</p>