Пример #1
0
 public override IAccount CreateAccount(IAccount account)
 {
     _table.InitializeDatabase();
     if (account.Id == 0)
     {
         account.Id = _table.AddData(ObjectToIAccountConverter.ConvertToKeyPairList(account));
     }
     else
     {
         _table.AddData(ObjectToIAccountConverter.ConvertToKeyPairListWithId(account));
     }
     return(account);
 }
Пример #2
0
 public override void UpdateAccount(IAccount account)
 {
     _table.InitializeDatabase();
     _table.UpdateData(ObjectToIAccountConverter.ConvertToKeyPairList(account), account.Id);
 }