public ActionResult Details(string id)
        {
            var model = db.Get(id);

            if (model == null)
            {
                return(View("NotFound"));
            }
            return(View(model));
        }
Beispiel #2
0
        public IActionResult Details(int id)
        {
            var empl = _employeesData.Get(id);

            if (empl is null)
            {
                return(NotFound());
            }
            return(View(new EmployeeView(empl)));
        }
Beispiel #3
0
        public IActionResult Details(int id)
        {
            var employee = _EmployeesData.Get(id);

            if (employee is not null)
            {
                return(View(employee));
            }
            return(NotFound());
        }
Beispiel #4
0
        //[Route("info-id-{id}")]
        public IActionResult Details(int id)
        {
            var employee = _EmployeesData.Get(id);//_Employees.FirstOrDefault(employe => employe.Id == id);

            if (employee == null)
            {
                return(NotFound());
            }
            return(View(employee));
        }
Beispiel #5
0
 public IActionResult Index()
 {
     return(View(_employeesData.Get()));
 }
 public IEnumerable <Employee> Get() => _EmployeesData.Get();
Beispiel #7
0
 //[Route("all")]
 public IActionResult Index()
 {
     //return View(_Employees);
     return(View(_EmployeesData.Get()));
 }
 //[Route("All")]
 public IActionResult Index() => View(_EmployeesData.Get());
 public IActionResult GetById(int id)
 {
     return(Ok(_EmployeesData.Get(id)));
 }
 public IEnumerable <Employee> Get()
 {
     _Logger.LogInformation("Api. Получение списка сотрудников");
     return(_EmployeesData.Get());
 }
 [HttpGet] // GET http://localhost:5001/api/employees
 //[HttpGet("all")] // GET http://localhost:5001/api/employees/all
 public IEnumerable <Employee> Get()
 {
     return(_employeesData.Get());
 }
        //[Route("All")]
        public IActionResult Index()
        {
            var employees = _Employees.Get();

            return(View(employees));
        }
Beispiel #13
0
 public IActionResult Index()
 {
     return(View(_db.Get()));
 }
Beispiel #14
0
 //[Route("all")]
 public IActionResult Index() => View(_employessData.Get());