Esempio n. 1
0
        private static void FourthTask(int skip, int take)
        {
            var transactionDataService = new TransactionDataService();
            var transactionalDataItems = transactionDataService.FetchTransactionalData(skip, take);

            Console.WriteLine();
            Console.WriteLine("Fetched transactional data items:");
            foreach (var item in transactionalDataItems)
            {
                Console.WriteLine($"{item.Id}\t{item.ReferenceDataId}\t{item.DataValue}");
            }
            Console.WriteLine();
        }
Esempio n. 2
0
        public JsonResult GetTransactionData(int skip, int take)
        {
            var transactionDataService = new TransactionDataService();

            var transactionalDataItems = Enumerable.Empty <TransactionalData>();

            var elapsedTime = PerformanceTools.MeasureElapsedTime(() =>
            {
                transactionalDataItems = transactionDataService.FetchTransactionalData(skip, take);
            });

            return(Json(new TransactionDataApiResponse
            {
                ElapsedTime = elapsedTime,
                TransactionalDataItems = transactionalDataItems
            }));
        }