public async Task <ActionResult <NotifMsgInterne> > PostNotifMsgInterne(NotifMsgInterne notifMsgInterne) { _context.notifMsgInternes.Add(notifMsgInterne); await _context.SaveChangesAsync(); return(CreatedAtAction("GetNotifMsgInterne", new { id = notifMsgInterne.Id }, notifMsgInterne)); }
public async Task <IActionResult> PutNotifMsgInterne(int id, NotifMsgInterne notifMsgInterne) { if (id != notifMsgInterne.Id) { return(BadRequest()); } _context.Entry(notifMsgInterne).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NotifMsgInterneExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }