public async Task <ActionResult <Rapport_Mission> > PostRapport_Mission(Rapport_Mission rapport_Mission) { _context.Rapport_Mission.Add(rapport_Mission); await _context.SaveChangesAsync(); return(CreatedAtAction("GetRapport_Mission", new { id = rapport_Mission.Id }, rapport_Mission)); }
public async Task <IActionResult> PutRapport_Mission(int id, Rapport_Mission rapport_Mission) { if (id != rapport_Mission.Id) { return(BadRequest()); } _context.Entry(rapport_Mission).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Rapport_MissionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }