Exemplo n.º 1
0
        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());
            }
        }
Exemplo n.º 2
0
        // 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());
            }
        }