public ApiOutputError Get(int id)
        {
            var error = _errorService.Get(id);

            return(new ApiOutputError
            {
                Id = error.Id,
                CreationDate = error.CreationDate,
                BriefDescription = error.BriefDescription,
                FullDescription = error.FullDescription,
                Status = error.Status,
                Priority = error.Priority,
                Seriousness = error.Seriousness,
                UserLogin = error.UserLogin,
                Histories = error.Histories
                            .Select(h => new ApiOutputHistory
                {
                    Action = h.Action,
                    Comment = h.Comment,
                    UserLogin = h.UserLogin
                })
                            .ToList()
            });
        }
 public ActionResult Index()
 {
     List<Error> errorList = errorService.Get(orderBy: x => x.OrderByDescending(d => d.Id));
     return View(errorList);
 }
예제 #3
0
 public static string Get(string key)
 {
     return(_service.Get(key));
 }
예제 #4
0
        public ActionResult View(int id)
        {
            Error @error = errorService.Get(id);

            return(View(@error));
        }