public async Task <IActionResult> PutChangeCurrencycs([FromRoute] int id, [FromBody] ChangeCurrencycs changeCurrencycs) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != changeCurrencycs.Id) { return(BadRequest()); } _context.Entry(changeCurrencycs).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ChangeCurrencycsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostChangeCurrencycs([FromBody] ChangeCurrencycs changeCurrencycs) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.ChangeCurrencycs.Add(changeCurrencycs); await _context.SaveChangesAsync(); return(CreatedAtAction("GetChangeCurrencycs", new { id = changeCurrencycs.Id }, changeCurrencycs)); }