public void Delete(TblBankAccount ob) { if (IsExist(ob.AcctId)) { db.TblBankAccount.Remove(ob); } }
public void Set(TblBankAccount ob) { if (ob.AcctId == 0) { db.TblBankAccount.Add(ob); } else { db.Entry(ob).State = EntityState.Modified; } }