public AdminArticleController( IArticleManagement articleManagement, IWebHostEnvironment appEnvironment, ICategoryManagement categoryManagement, UserManager <AppUser> userManager) { this.articleManagement = articleManagement; this.appEnvironment = appEnvironment; this.categoryManagement = categoryManagement; this.UserManager = userManager; }
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); } }