public JsonResult ImportTransactionData() { var transactionDataService = new TransactionDataService(); var elapsedTime = PerformanceTools.MeasureElapsedTime(() => transactionDataService.Import()); return(Json(new BaseApiResponse { ElapsedTime = elapsedTime })); }
public JsonResult GenerateTransactionData(int batchCount, int rowsInFile) { var transactionDataService = new TransactionDataService(); var elapsedTime = PerformanceTools.MeasureElapsedTime(() => transactionDataService.Generate(batchCount, rowsInFile)); return(Json(new BaseApiResponse { ElapsedTime = elapsedTime })); }
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(); }
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 })); }
private static void ThirdTask() { var transactionDataService = new TransactionDataService(); transactionDataService.Import(); }
private static void SecondTask(int batchCount, int rowsInFile) { var transactionDataService = new TransactionDataService(); transactionDataService.Generate(batchCount, rowsInFile); }