public async Task <IActionResult> PostBank_Transaction_History([FromBody] Bank_Transaction_History bank_Transaction_History) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.Bank_Transaction_History.Add(bank_Transaction_History); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBank_Transaction_History", new { id = bank_Transaction_History.TransactionId }, bank_Transaction_History)); }
public async Task <IActionResult> PutBank_Transaction_History([FromRoute] string id, [FromBody] Bank_Transaction_History bank_Transaction_History) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != bank_Transaction_History.TransactionId) { return(BadRequest()); } _context.Entry(bank_Transaction_History).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Bank_Transaction_HistoryExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }