You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ApplicantsController.cs 725B

123456789101112131415161718192021222324252627
  1. namespace Diligent.WebAPI.Host.Controllers.V1
  2. {
  3. [ApiVersion("1.0")]
  4. [Route("v{version:apiVersion}/applicants")]
  5. [ApiController]
  6. public class ApplicantsController:ControllerBase
  7. {
  8. private readonly IApplicantService _applicantService;
  9. public ApplicantsController(IApplicantService applicantService)
  10. {
  11. _applicantService = applicantService;
  12. }
  13. [HttpGet]
  14. public async Task<IActionResult> GetAll()
  15. {
  16. return Ok(await _applicantService.GetAll());
  17. }
  18. [HttpGet("{id}")]
  19. public async Task<IActionResult> GetById(int id)
  20. {
  21. return Ok(await _applicantService.GetById(id));
  22. }
  23. }
  24. }