示例#1
0
        public void SaveCustomer(Customer customer)
        {
            EFDbSGBankEntities entities = new EFDbSGBankEntities();

            entities.Customers.Attach(customer);
            entities.Entry(customer).State = EntityState.Modified;
            entities.SaveChanges();
        }
示例#2
0
        public void SaveAccount(Account account)
        {
            EFDbSGBankEntities entities = new EFDbSGBankEntities();

            entities.Accounts.Attach(account);
            entities.Entry(account).State = EntityState.Modified;
            entities.SaveChanges();
        }