public async void TestGetAll() { StockServiceDAL service = new StockServiceDAL(this.tableName); var stocklist = await service.GetAll(); Console.WriteLine("list count: " + stocklist.Count); }
public async void TestGetItem() { StockServiceDAL service = new StockServiceDAL(this.tableName); var stock = await service.GetItem("CCL"); Console.WriteLine("code : " + stock.Code + " " + stock.Company); }
public StockLoadController() { this.S3_Bucket_Name = Environment.GetEnvironmentVariable("SCREEN3_S3_BUCKET"); this.Temp_Folder = Environment.GetEnvironmentVariable("SCREEN3_TEMP_FOLDER"); this.s3service = new S3Service(); string asx300TableName = Environment.GetEnvironmentVariable("SCREEN3_ASX300_TABLE_NAME"); this.dal = new StockServiceDAL(asx300TableName); }
public DataLoadController() { this.S3_Bucket_Name = Environment.GetEnvironmentVariable("SCREEN3_S3_BUCKET"); this.Temp_Folder = Environment.GetEnvironmentVariable("SCREEN3_TEMP_FOLDER"); string asx300TableName = Environment.GetEnvironmentVariable("SCREEN3_ASX300_TABLE_NAME"); this.Ticker_Email_Account = Environment.GetEnvironmentVariable("SCREEN3_TICKER_EMAIL_ACCOUNT"); this.Ticker_Email_Pwd = Environment.GetEnvironmentVariable("SCREEN3_TICKER_EMAIL_PWD"); this.dal = new StockServiceDAL(asx300TableName); this.stockDict = new Dictionary <string, List <TickerEntity> >(); }
public void TestInsertNewStock() { StockServiceDAL service = new StockServiceDAL(this.tableName); StockEntity stock = new StockEntity { Code = "sun", Company = "suncorp", Sector = "sector 111", Cap = 123, Weight = 0.012 }; service.InsertNewStock(stock).Wait(); }
public async void TestDelete() { StockServiceDAL service = new StockServiceDAL(this.tableName); await service.Delete("SUN"); }
public StockBLL(string tableName) { this.dal = new StockServiceDAL(tableName); }