public async Task <ActionResult <MTaxType> > PostMTaxType(MTaxType mTaxType) { _context.MTaxType.Add(mTaxType); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMTaxType", new { id = mTaxType.TxTypId }, mTaxType)); }
public async Task <IActionResult> PutMTaxType(int id, MTaxType mTaxType) { if (id != mTaxType.TxTypId) { return(BadRequest()); } _context.Entry(mTaxType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MTaxTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }