public async Task <ActionResult <StudioShow> > PostStudioShow(StudioShow studioShow) { _context.StudioShows.Add(studioShow); await _context.SaveChangesAsync(); return(CreatedAtAction("GetStudioShow", new { id = studioShow.Id }, studioShow)); }
public async Task <IActionResult> PutStudioShow(int id, StudioShow studioShow) { if (id != studioShow.Id) { return(BadRequest()); } _context.Entry(studioShow).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StudioShowExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }