Example #1
0
        private static void SetColumnMappings(SqlBulkCopy copy)
        {
            if (copy.DestinationTableName == Settings.StockTableName)
            {
                StockDataTable.SetColumnMappings(copy);
                return;
            }

            if (copy.DestinationTableName == Settings.InterestRateTableName)
            {
                InterestRateDataTable.SetColumnMappings(copy);
                return;
            }

            throw new Exception($"Failed: the table name {copy.DestinationTableName} is currently not supported");
        }
Example #2
0
        internal static void WriteStockDataToDatabase(SortedDictionary <string, SortedDictionary <DateTime, StockObservation> > instrumentObservations)
        {
            DataTable dataTable = StockDataTable.CreateDataTableObject(instrumentObservations);

            WriteTableToDataBase(dataTable);
        }