public async Task <ActionResult <IEnumerable <ChangeLogViewModel> > > Get() { var changeLogs = await changeLogSystemRepository.Get(); if (changeLogs?.Any() == true) { var result = changeLogs.Select(cl => (ChangeLogViewModel)cl).ToList().OrderByDescending(cl => cl.Identity).AsEnumerable(); return(Ok(result)); } else { return(NotFound()); } }
// GET: ChangeLogController public async Task <IActionResult> Index() { var changeLogs = await changeLogSystemRepository.Get(); if (changeLogs?.Any() == true) { var result = changeLogs.Select(cl => (ChangeLogModel)cl).ToList().AsEnumerable(); return(View(result)); } else { return(NotFound()); } }