public async Task LoadAsx300Async() { // Load asx list. LambdaLogger.Log($"In Load Asx300Async...\n"); var stockList = await dal.GetAll(); LambdaLogger.Log($"Found existing items {stockList.Count}, abou to remove them all.\n"); foreach (StockEntity stock in stockList) { await dal.Delete(stock.Code); } LambdaLogger.Log($"Remove all items done.\n"); LambdaLogger.Log($"About populate all stocks.\n"); string resultPath = await this.s3service.DownloadFileFromS3Async(this.S3_Bucket_Name, "asx300.csv", this.Temp_Folder + "asx300/"); var newStockList = this.LoadStockFromCSV(resultPath); foreach (var s in newStockList) { await this.dal.InsertNewStock(s); } LambdaLogger.Log($"{newStockList.Count} new items been populated into the db.\n"); }
public async void TestGetAll() { StockServiceDAL service = new StockServiceDAL(this.tableName); var stocklist = await service.GetAll(); Console.WriteLine("list count: " + stocklist.Count); }