//依赖注入
 public HomeController(IBannerServices bannerServices, INewsServices newsServices, INewsClassifyServices newsClassifyServices, INewsCommentServices newsCommentServices)
 {
     this.bannerServices       = bannerServices;
     this.newsServices         = newsServices;
     this.newsClassifyServices = newsClassifyServices;
     this.newsCommentServices  = newsCommentServices;
 }
Beispiel #2
0
 public NewsController(INewsServices newsServices, INewsClassifyServices newsClassifyServices, IHostingEnvironment host)
 {
     this.newsServices         = newsServices;
     this.newsClassifyServices = newsClassifyServices;
     this.host = host;
 }
Beispiel #3
0
 //依赖注入
 public NewsController(INewsServices newsServices, INewsCommentServices newsCommentServices, INewsClassifyServices newsClassifyServices)
 {
     this.newsServices         = newsServices;
     this.newsCommentServices  = newsCommentServices;
     this.newsClassifyServices = newsClassifyServices;
 }