Example #1
0
        public ActionResult LogDetails(int?logId)
        {
            var log = _loggerService.GetLogById(logId);

            if (log.Success)
            {
                switch (log.Value.LogType)
                {
                case LogType.Action:
                    return(View("LogAction", log.Value.ToDetailsAction()));    //to action view model

                case LogType.Exception:
                    return(View("LogException", log.Value.ToDetailsException()));    //to exception view model

                default:
                    return(HttpNotFound());
                }
            }

            return(new HttpOperationStatusResult(log));
        }