public async Task <IActionResult> PutMoviesComingSoonDBModel(int id, MoviesComingSoonDB moviesComingSoonDBModel) { if (id != moviesComingSoonDBModel.id) { return(BadRequest()); } _context.Entry(moviesComingSoonDBModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MoviesComingSoonDBModelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <MoviesComingSoonDB> > PostMoviesComingSoonDBModel(MoviesComingSoonDB moviesComingSoonDBModel) { _context.moviesComingSoonDB.Add(moviesComingSoonDBModel); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMoviesComingSoonDBModel", new { moviesComingSoonDBModel.id }, moviesComingSoonDBModel)); }