Exemplo n.º 1
0
        public IActionResult Details(int id)
        {
            Worker worker = _workerRepository.GetWorkersById(id);

            if (worker == null)
            {
                return(RedirectToAction("Index"));
            }

            return(View(worker));
        }
Exemplo n.º 2
0
        public WorkerDTO GetWorkerById(int id)
        {
            var worker = _workerRepository.GetWorkersById(id);
            var result = _workerMapper.GetWorkerDTOFromWorkers(worker);

            return(result);
        }