using Dto.Factories; using Interface; using Microsoft.AspNetCore.Mvc; using Modele.Classe; // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 namespace Api.Controllers { [Route("[controller]")] [ApiController] public class FullSession : ControllerBase { private readonly IApi data; public FullSession(IApi manager) { this.data = manager; } // GET: api/ [HttpGet] public async Task Get() { IEnumerable sessions = (await data.GetFullSessions()); if (sessions == null) { return NotFound(); } return Ok(sessions.Select(e => e.ModeleToDTO())); } } }