-
-
Save binerdy/8539829085aefd8e222f3ca5cda52a89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpGet("{id}")] | |
public async Task<ActionResult<Employee>> GetEmployeeById(long id) | |
{ | |
try | |
{ | |
Employee employee = await _employeeRepository.Get(id); | |
return Ok(employee); | |
} | |
catch (Exception e) | |
{ | |
return NotFound(e.Message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment