private Lid GeefLid(int Id) { if (IsAlsLidIngelogd()) { return(_lidRepository.GetByEmail(HttpContext.User.Identity.Name)); } if (IsAlsLesgeverIngelogd()) { return(_lidRepository.GetById(Id)); } return(null); }
public override void OnActionExecuting(ActionExecutingContext context) { context.ActionArguments["lid"] = context.HttpContext.User.Identity.IsAuthenticated ? _lidRepository.GetByEmail(context.HttpContext.User.Identity.Name) : null; base.OnActionExecuting(context); }