添加控制器
访问测试
- 默认控制器访问index
public string Index()
{
return "This is my default action...";
}
- 特定访问路径
public string Welcome()
{
return "This is the Welcome action method...";
}
- 特定路径访问,带参数
public string WelcomeWithParm(string name, int numTimes = 1)
{
return HtmlEncoder.Default.Encode($"Hello {name}, NumTimes is: {numTimes}");
}