Ejemplo n.º 1
0
 public NavItemController(INavItemRepository navItemRepository, INavItemVersionRepository navItemVersionRepository, UserManager <ApplicationUser> userManager, IToastNotification toastNotification, IEventLogger <NavItemController> eventLogger, IApprovalNotificationsRepository approvalNotificationsRepository)
 {
     _navItemRepository        = navItemRepository;
     _navItemVersionRepository = navItemVersionRepository;
     _userManager       = userManager;
     _toastNotification = toastNotification;
     _eventLogger       = eventLogger;
     _approvalNotificationsRepository = approvalNotificationsRepository;
 }
Ejemplo n.º 2
0
 public NavItemRepository(ApplicationDbContext db, INavItemVersionRepository navItemVersionRepository, ILogger <NavItemRepository> logger, IHttpContextAccessor httpContextAccessor)
 {
     _db = db;
     _navItemVersionRepository = navItemVersionRepository;
     _logger = logger;
     _httpContextAccessor = httpContextAccessor;
     userName             = _httpContextAccessor.HttpContext.User.Identity.Name;
     _userId = _httpContextAccessor.HttpContext.User.FindFirstValue(ClaimTypes.NameIdentifier);
 }