Exemplo n.º 1
0
        public IActionResult Details(int id)
        {
            EmployeeViewModel employee = _db.GetById(id);

            if (employee != null)
            {
                return(View(employee));
            }
            else
            {
                return(NotFound());
            }
        }
Exemplo n.º 2
0
        private EmployeeView FindEmployee(int?id)
        {
            if (!id.HasValue)
            {
                return(null);
            }
            var employee = _EmployeeData.GetById(id.Value)?.MapEmployeeView();

            return(employee);
        }
 public EmployeeViewModel GetById(int id)
 {
     return _employeesData.GetById(id);
 }