Inheritance: IInspectRService
Example #1
0
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            DbContext = (InspectRContext)HttpContext.Items["InspectRContext"];
            _service = new InspectRService(DbContext);

            if (User != null)
            {
                var username = User.Identity.Name;
                if (!string.IsNullOrEmpty(username))
                {
                    // todo: map a dto
                    ViewBag.UserProfile = DbContext.GetUserProfile(username);
                }
            }

            base.OnActionExecuting(filterContext);
        }
Example #2
0
 protected override void OnActionExecuting(ActionExecutingContext filterContext)
 {
     DbContext = (InspectRContext)HttpContext.Items["InspectRContext"];
     _service = new InspectRService(DbContext);
     base.OnActionExecuting(filterContext);
 }