Esempio n. 1
0
 public async void SaveWeatherData(WeatherData weather)
 {
     try
     {
         _context.Add(weather);
         await _context.SaveChangesAsync();
     }
     catch (Exception e)
     {
         Console.WriteLine($"{e}");
     }
 }
        public async void SaveLocationData(LocationData location)
        {
            try
            {
                await _context.AddAsync(location);

                await _context.SaveChangesAsync();
            }
            catch (Exception e)
            {
                Console.WriteLine($"{e}");
            }
        }