Esempio n. 1
0
        public ActionResult Details(string id)
        {
            var model = db.Get(id);

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

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

            if (employee is not null)
            {
                return(View(employee));
            }
            return(NotFound());
        }
Esempio n. 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));
        }
Esempio n. 5
0
 public IActionResult Index()
 {
     return(View(_employeesData.Get()));
 }
 public IEnumerable <Employee> Get() => _EmployeesData.Get();
Esempio n. 7
0
 //[Route("all")]
 public IActionResult Index()
 {
     //return View(_Employees);
     return(View(_EmployeesData.Get()));
 }
Esempio n. 8
0
 //[Route("All")]
 public IActionResult Index() => View(_EmployeesData.Get());
 public IActionResult GetById(int id)
 {
     return(Ok(_EmployeesData.Get(id)));
 }
Esempio n. 10
0
 public IEnumerable <Employee> Get()
 {
     _Logger.LogInformation("Api. Получение списка сотрудников");
     return(_EmployeesData.Get());
 }
Esempio n. 11
0
 [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));
        }
Esempio n. 13
0
 public IActionResult Index()
 {
     return(View(_db.Get()));
 }
Esempio n. 14
0
 //[Route("all")]
 public IActionResult Index() => View(_employessData.Get());