Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ApplicantsController.cs 769B

1234567891011121314151617181920212223242526272829
  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. //[Authorize]
  14. [HttpGet]
  15. public async Task<IActionResult> GetAll()
  16. {
  17. return Ok(await _applicantService.GetAll());
  18. }
  19. //[Authorize]
  20. [HttpGet("{id}")]
  21. public async Task<IActionResult> GetById(int id)
  22. {
  23. return Ok(await _applicantService.GetById(id));
  24. }
  25. }
  26. }