public async Task <ActionResult <TaxesMonth> > Post(TaxesMonth taxesMonth) { _context.TaxesMonth.Add(taxesMonth); await _context.SaveChangesAsync(); return(taxesMonth); }
public async Task <IActionResult> Put(int id, TaxesMonth taxesMonth) { if (id != taxesMonth.Id) { return(BadRequest()); } _context.Entry(taxesMonth).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TaxesMonthExists(id)) { return(NotFound()); } else { throw; } } return(Ok()); }