public ActionResult Details(string id) { var model = db.Get(id); if (model == null) { return(View("NotFound")); } return(View(model)); }
public IActionResult Details(int id) { var empl = _employeesData.Get(id); if (empl is null) { return(NotFound()); } return(View(new EmployeeView(empl))); }
public IActionResult Details(int id) { var employee = _EmployeesData.Get(id); if (employee is not null) { return(View(employee)); } return(NotFound()); }
//[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)); }
public IActionResult Index() { return(View(_employeesData.Get())); }
public IEnumerable <Employee> Get() => _EmployeesData.Get();
//[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)); }
public IActionResult Index() { return(View(_db.Get())); }
//[Route("all")] public IActionResult Index() => View(_employessData.Get());