| 1234567891011121314151617181920212223 |
- namespace Diligent.WebAPI.Host.Controllers.V1
- {
- [ApiVersion("1.0")]
- [Route("v{version:apiVersion}/selectionlevels")]
- [ApiController]
- public class SelectionLevelsController : ControllerBase
- {
- private readonly ISelectionLevelService _selectionLevelService;
-
- public SelectionLevelsController(ISelectionLevelService selectionLevelService)
- {
- _selectionLevelService = selectionLevelService;
- }
-
- [HttpGet]
- public async Task<IActionResult> GetAll() =>
- Ok(await _selectionLevelService.GetAllAsync());
-
- [HttpGet("{id}")]
- public async Task<IActionResult> GetById([FromRoute] int id) =>
- Ok(await _selectionLevelService.GetByIdAsync(id));
- }
- }
|