public async Task <IActionResult> PutZetronTrnFrameTags([FromRoute] int id, [FromBody] ZetronTrnFrameTags zetronTrnFrameTags) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != zetronTrnFrameTags.FrameId) { return(BadRequest()); } _context.Entry(zetronTrnFrameTags).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ZetronTrnFrameTagsExists(id)) { return(NotFound()); } else { throw; } } return(Ok()); }
public async Task <IActionResult> PostZetronTrnFrameTags([FromBody] ZetronTrnFrameTags zetronTrnFrameTags) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.ZetronTrnFrameTags.Add(zetronTrnFrameTags); await _context.SaveChangesAsync(); return(CreatedAtAction("GetZetronTrnFrameTags", new { id = zetronTrnFrameTags.FrameId }, zetronTrnFrameTags)); }