예제 #1
0
        public void OnException(ExceptionContext filterContext)
        {
            BLogDetail logerModel = new BLogDetail()
            {
                Message        = filterContext.Exception.Message,
                StackTrace     = filterContext.Exception.StackTrace,
                ControllerName = filterContext.RouteData.Values["controller"].ToString(),
                ActionName     = filterContext.RouteData.Values["action"].ToString(),
                Date           = DateTime.Now
            };

            db.CreateOrUpdate(logerModel);
            filterContext.ExceptionHandled = true;
        }