如何在ASP.Net MVC控制器中实现方法注入动作方法

时间:2015-09-29 20:07:30

标签: asp.net-mvc c#-4.0 dependency-injection

public ActionResult Hello(IEmployee employee)
    {
        employee.Name = "ABC";
        employee.Company = "XYZ";
        employee.SSN = "****";
        return View(employee);
    }

我通过抽象传递雇员对象。

0 个答案:

没有答案