public async Task <IActionResult> PutTbaliseLinkReaction(byte id, TbaliseLinkReaction tbaliseLinkReaction) { if (id != tbaliseLinkReaction.TbaliseLinkReactionId) { return(BadRequest()); } _context.Entry(tbaliseLinkReaction).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TbaliseLinkReactionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <TbaliseLinkReaction> > PostTbaliseLinkReaction(TbaliseLinkReaction tbaliseLinkReaction) { _context.TbaliseLinkReaction.Add(tbaliseLinkReaction); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (TbaliseLinkReactionExists(tbaliseLinkReaction.TbaliseLinkReactionId)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetTbaliseLinkReaction", new { id = tbaliseLinkReaction.TbaliseLinkReactionId }, tbaliseLinkReaction)); }