📜  执行相同的代码 mvc - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:07.849000             🧑  作者: Mango

代码示例1
Build a base controller

public class BaseController : Controller
{
    protected override void OnActionExecuting(ActionExecutingContext context)
    {
        base.OnActionExecuting(context);
        // your code here
    }
}

public class HomeController : BaseController // instead of Controller
{
    // ...
}