public async Task <IActionResult> Puttax_settings([FromRoute] int id, [FromBody] tax_settings tax_settings) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != tax_settings.id) { return(BadRequest()); } _context.Entry(tax_settings).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!tax_settingsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Posttax_settings([FromBody] tax_settings tax_settings) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.tax_settings.Add(tax_settings); await _context.SaveChangesAsync(); return(CreatedAtAction("Gettax_settings", new { id = tax_settings.id }, tax_settings)); }