private static void OnTimedEvent(Object source, ElapsedEventArgs e, int id) { ILoanServices MyService = new LoanServices(); loan loan = MyService.GetById(id); MyService.PayBackLoan(loan); Console.WriteLine("The Elapsed event was raised at {0:HH:mm:ss.fff}", e.SignalTime); Console.WriteLine("Rest amount: " + loan.RestAmount); Console.WriteLine("Balance: " + loan.account.AccountBalance); }