public async Task <IActionResult> PutCustomerMaster(string id, CustomerMaster customerMaster) { if (id != customerMaster.CustCd) { return(BadRequest()); } _context.Entry(customerMaster).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomerMasterExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public void Update(UserInfo obj) { context.Entry(obj).State = Microsoft.EntityFrameworkCore.EntityState.Modified; context.SaveChanges(); }