public async Task <ActionResult <taxe_code> > Posttaxe_code(taxe_code taxe_code) { _context.taxe_codes.Add(taxe_code); await _context.SaveChangesAsync(); return(CreatedAtAction("Gettaxe_code", new { id = taxe_code.id }, taxe_code)); }
public async Task <IActionResult> Puttaxe_code(int id, taxe_code taxe_code) { if (id != taxe_code.id) { return(BadRequest()); } _context.Entry(taxe_code).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!taxe_codeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }