public async Task ProcessAndSave(IBankDB iBankDB)
 {
     var timer = new System.Threading.Timer((e) => /* Setting a timed function on another thread */
     {
         iBankDB.ProcessAllTransactions();         //processing and saving
         iBankDB.SavetoDisk();
     }, null, 0, 30000);
 }
        public BusinessTransactionAccessImpl()
        {
            ChannelFactory <ITransactionAccess> TransactionAccessFactory;        /*  Connecting to Transaction Interface in Data Tier  */
            NetTcpBinding tcpBinding = new NetTcpBinding();

            TransactionAccessFactory = new ChannelFactory <ITransactionAccess>(tcpBinding, "net.tcp://localhost:8005/TransactionAccess");
            iTransactionAccess       = TransactionAccessFactory.CreateChannel();


            ChannelFactory <IBankDB> BankFactory;
            NetTcpBinding            tcpBinding2 = new NetTcpBinding();         /*  Connecting to Transaction Interface in Data Tier  */

            BankFactory = new ChannelFactory <IBankDB>(tcpBinding2, "net.tcp://localhost:8005/BankDB");
            iBankDB     = BankFactory.CreateChannel();
        }