Created
July 2, 2020 09:31
-
-
Save johnmmoss/a0c1c58fda6f062764e7bb5442599854 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
[Route("api/[controller]")] | |
[ApiController] | |
public class EmployeeController : ControllerBase | |
{ | |
private readonly HrContext _hrContext; | |
public EmployeeController(HrContext hrContext) | |
{ | |
_hrContext = hrContext; | |
} | |
[HttpGet] | |
public ActionResult Get() | |
{ | |
var employees = _hrContext.Employees.ToList(); | |
return Ok(employees); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment