Skip to content

Instantly share code, notes, and snippets.

@hakant
Last active September 8, 2018 20:04
Show Gist options
  • Save hakant/057842483beb1a1b6561b849876fea36 to your computer and use it in GitHub Desktop.
Save hakant/057842483beb1a1b6561b849876fea36 to your computer and use it in GitHub Desktop.
[ApiVersion("1.0")]
[ApiVersion("2.0")]
[Route("api/home")]
public class HomeController : Controller
{
[HttpGet]
public string Get() => "Version 1";
[HttpGet, MapToApiVersion("2.0")]
public string GetV2() => "Version 2";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment