using Microsoft.AspNetCore.Mvc; namespace TicketAppIncrArchi.Controllers; [ApiController] [Route("api/tickets")] public class TicketsController : ControllerBase { private static List Tickets = new(); [HttpGet] public IEnumerable Get() => Tickets; [HttpPost] public IActionResult Create(Ticket ticket) { ticket.Id = Guid.NewGuid(); Tickets.Add(ticket); return CreatedAtAction(nameof(Get), new {id = ticket.Id}, ticket); } public class Ticket { public Guid Id {get;set;} public string Title {get;set;} = ""; public string Description {get;set;} = ""; //public string Status {get;set;} = ""; } }