public async Task <ActionResult <SeatShowing> > PostSeatShowing(SeatShowing seatShowing) { _context.seatShowing.Add(seatShowing); await _context.SaveChangesAsync(); return(CreatedAtAction("GetSeatShowing", new { id = seatShowing.SeatShowingID }, seatShowing)); }
public async Task <IActionResult> PutSeatShowing(int id, SeatShowing seatShowing) { if (id != seatShowing.SeatShowingID) { return(BadRequest()); } _context.Entry(seatShowing).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SeatShowingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }