public ActionResult UpdateEventParticipation(int userId, int eventId, [FromBody] EventParticipation eventParticipationItem) { if (eventId != eventParticipationItem.EventId || userId != eventParticipationItem.UserId) { return(BadRequest()); } ntuEventsContext_Db.Entry(eventParticipationItem).State = EntityState.Modified; ntuEventsContext_Db.SaveChanges(); return(NoContent()); }
public ActionResult UpdateCca(int ccaId, [FromBody] Cca ccaItem) { if (ccaId != ccaItem.CcaId) { return(BadRequest()); } ntuEventsContext_Db.Entry(ccaItem).State = EntityState.Modified; ntuEventsContext_Db.SaveChanges(); return(NoContent()); }
public ActionResult UpdateUser(int userId, [FromBody] User userItem) { if (userId != userItem.UserId) { return(BadRequest()); } ntuEventsContext_Db.Entry(userItem).State = EntityState.Modified; ntuEventsContext_Db.SaveChanges(); return(NoContent()); }