public async Task <IActionResult> PutRappel(int id, Rappel rappel) { if (id != rappel.IdRappel) { return(BadRequest()); } _context.Entry(rappel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RappelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Rappel> > PostRappel(Rappel rappel) { _context.Rappel.Add(rappel); await _context.SaveChangesAsync(); return(CreatedAtAction("GetRappel", new { id = rappel.IdRappel }, rappel)); }