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 GetAll() => Ok(await _selectionLevelService.GetAllAsync()); [HttpGet("{id}")] public async Task GetById([FromRoute] int id) => Ok(await _selectionLevelService.GetByIdAsync(id)); } }