title: Using [FromQuery] to parse enum values
body: <p>I'm using the <code>[FromQuery]</code> attribute to parse a <code>Get</code> requests arguments into a complex object. For example:</p>
  
  <pre><code>[HttpGet("some-get-request")]
  public IActionResult DoSomething([FromQuery] SomeArguments someArgs)
  {
  
  }
  </code></pre>
  
  <p>One of the properties of the <code>SomeArguments</code> object is an <code>enum</code>.</p>
  
  <pre><code>public enum SomeEnum { EnumValue01, EnumValue02 }
  
  public class SomeArguments 
  {
      [FromQuery(Name = "enum_arg")]
      public SomeEnum EnumArgument { get; set; }
  }
  </code></pre>
  
  <p>And I call the endpoint with something like:</p>
  
  <blockquote>
    <p><a href="http://localhost:1234/api/some-controller/some-get-request?enum_arg=EnumValue01" rel="noreferrer">http://localhost:1234/api/some-controller/some-get-request?enum_arg=EnumValue01</a></p>
  </blockquote>
  
  <p>And this all works great. However, I want to be able to use a different enum value in the URL than in my C# enum value. For example, I want to call using a URL such as </p>
  
  <blockquote>
    <p><a href="http://localhost:1234/api/some-controller/some-get-request?enum_arg=" rel="noreferrer">http://localhost:1234/api/some-controller/some-get-request?enum_arg=</a><em>eval01</em></p>
  </blockquote>
  
  <p>How can I do this?</p>
  
  <p>I thought I could use the [FromQuery] attribute, like I can with properties, but that doesnt seem to be possible:</p>
  
  <blockquote>
    <p>'FromQuery' is not valid on this declaration type. It is only valid on 'property, indexer, parameter'</p>
  </blockquote>