public async Task <IActionResult> PutBank_User_Client([FromRoute] string id, [FromBody] Bank_User_Client bank_User_Client) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != bank_User_Client.IdentityNumber) { return(BadRequest()); } _context.Entry(bank_User_Client).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Bank_User_ClientExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostBank_User_Client([FromBody] Bank_User_Client bank_User_Client) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.Bank_User_Client.Add(bank_User_Client); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBank_User_Client", new { id = bank_User_Client.IdentityNumber }, bank_User_Client)); }