public void SaveCustomer(Customer customer) { EFDbSGBankEntities entities = new EFDbSGBankEntities(); entities.Customers.Attach(customer); entities.Entry(customer).State = EntityState.Modified; entities.SaveChanges(); }
public void SaveAccount(Account account) { EFDbSGBankEntities entities = new EFDbSGBankEntities(); entities.Accounts.Attach(account); entities.Entry(account).State = EntityState.Modified; entities.SaveChanges(); }