Esempio n. 1
0
        /// <summary>
        /// Import a given list of climate data into the database
        /// </summary>
        /// <param name="dataAccess">Database Access object (e.g. SqliteDataAccess)</param>
        /// <param name="climateData">List of ClimateData objects</param>
        private static void ImportClimateDataIntoDatabase(IDatabaseAccess dataAccess, List <ClimateData> climateData)
        {
            if (!dataAccess.ClimateDataDbExists())
            {
                dataAccess.CreateClimateDataDb();
            }

            dataAccess.SaveClimateData(climateData);
        }