public async Task <ActionResult <Nextone> > PostNextone(Nextone nextone) { _context.Nextones.Add(nextone); await _context.SaveChangesAsync(); return(CreatedAtAction("GetNextone", new { id = nextone.NextoneId }, nextone)); }
public async Task <IActionResult> PutNextone(int id, Nextone nextone) { if (id != nextone.NextoneId) { return(BadRequest()); } _context.Entry(nextone).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NextoneExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }