Как установить значение в командной оболочке для ядра dotnet?

Вы можете использовать [ActionName («NewActionName»)] для использования того же метода с другим именем:

public class HomeController : Controller
{
    public ActionResult GetEmpName()
    {
        return Content("This is the test Message");
    }

    [ActionName("GetEmpWithCode")]
    public ActionResult GetEmpName(string EmpCode)
    {
        return Content("This is the test Messagewith Overloaded");
    }
}
22
задан Hamza Ahmed Zia 3 September 2016 в 11:57
поделиться