public async Task <ActionResult <TenboTag> > PostTenboTag(TenboTag tenboTag) { _context.TenboTag.Add(tenboTag); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTenboTag", new { id = tenboTag.Id }, tenboTag)); }
public async Task <IActionResult> PutTenboTag(Guid id, TenboTag tenboTag) { if (id != tenboTag.Id) { return(BadRequest()); } _context.Entry(tenboTag).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TenboTagExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }