Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

SelectionLevelsController.cs 756B

1234567891011121314151617181920212223
  1. namespace Diligent.WebAPI.Host.Controllers.V1
  2. {
  3. [ApiVersion("1.0")]
  4. [Route("v{version:apiVersion}/selectionlevels")]
  5. [ApiController]
  6. public class SelectionLevelsController : ControllerBase
  7. {
  8. private readonly ISelectionLevelService _selectionLevelService;
  9. public SelectionLevelsController(ISelectionLevelService selectionLevelService)
  10. {
  11. _selectionLevelService = selectionLevelService;
  12. }
  13. [HttpGet]
  14. public async Task<IActionResult> GetAll() =>
  15. Ok(await _selectionLevelService.GetAllAsync());
  16. [HttpGet("{id}")]
  17. public async Task<IActionResult> GetById([FromRoute] int id) =>
  18. Ok(await _selectionLevelService.GetByIdAsync(id));
  19. }
  20. }