コード例 #1
0
 public AdminArticleController(
     IArticleManagement articleManagement,
     IWebHostEnvironment appEnvironment,
     ICategoryManagement categoryManagement,
     UserManager <AppUser> userManager)
 {
     this.articleManagement  = articleManagement;
     this.appEnvironment     = appEnvironment;
     this.categoryManagement = categoryManagement;
     this.UserManager        = userManager;
 }
コード例 #2
0
        public ArticleController(
            IArticleManagement articleManagement,
            IWebHostEnvironment appEnvironment,
            ICategoryManagement categoryManagement,
            UserManager <AppUser> userManager)
        {
            this.articleManagement  = articleManagement;
            this.appEnvironment     = appEnvironment;
            this.categoryManagement = categoryManagement;
            this.UserManager        = userManager;

            if (this.User != null)
            {
                this.UserId = this.UserManager.GetUserId(this.User);
            }
        }