Skip to content

Instantly share code, notes, and snippets.

@nbxx
Last active September 21, 2016 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbxx/2f6ac20a4fa14754ad74b2fe9b6b3bc2 to your computer and use it in GitHub Desktop.
Save nbxx/2f6ac20a4fa14754ad74b2fe9b6b3bc2 to your computer and use it in GitHub Desktop.
using System;
using Microsoft.AspNetCore.Mvc;
namespace ConsoleApplication
{
public class HomeController
{
[HttpGet("/{name}")]
public string Index(string name)
{
return $"Hello {name}";
}
[HttpGet("/")]
public string Index()
{
return "Hello ASP.NET Core MVC";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment