public async Task <Ticket> CreateTicket(Ticket ticket) { if (ticket == null) { throw new ArgumentNullException(nameof(ticket)); } await _context.Tickets.AddAsync(ticket); await _context.SaveChangesAsync(); return(ticket); }
public async Task <Event> CreateEvent(Event evt) { if (evt == null) { throw new ArgumentNullException(nameof(evt)); } await _context.Events.AddAsync(evt); await _context.SaveChangesAsync(); return(evt); }