优化autofac注入方式,Controller使用属性注入

This commit is contained in:
yubaolee
2017-03-24 15:35:52 +08:00
parent 9122bec093
commit 96a9ee6bd2
20 changed files with 1948 additions and 2029 deletions

View File

@@ -12,13 +12,7 @@ namespace OpenAuth.Mvc.Controllers
{
public class HomeController : BaseController
{
private ModuleManagerApp _app;
public HomeController()
{
_app = AutofacExt.GetFromFac<ModuleManagerApp>();
}
public ActionResult Index()
{
ViewBag.NavBar = GetNavBar();