public async Task <ActionResult <FxTrades> > PostFxTrades(FxTrades fxTrades) { _context.FxTrades.Add(fxTrades); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFxTrades", new { id = fxTrades.FxTradeId }, fxTrades)); }
public async Task <IActionResult> PutFxTrades(int id, FxTrades fxTrades) { if (id != fxTrades.FxTradeId) { return(BadRequest()); } _context.Entry(fxTrades).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FxTradesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }