public async Task <ActionResult <Emptb> > PostEmptb(Emptb emptb) { _context.Emptb.Add(emptb); await _context.SaveChangesAsync(); return(CreatedAtAction("GetEmptb", new { id = emptb.Id }, emptb)); }
public async Task <IActionResult> PutEmptb(int id, Emptb emptb) { if (id != emptb.Id) { return(BadRequest()); } _context.Entry(emptb).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EmptbExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }