Ejemplo n.º 1
0
 public void Add(List <HistoricalWeather> list)
 {
     using (var cx = new FoodDBContext())
     {
         cx.HistoricalWeathers.AddRange(list);
         cx.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public int AddCity(List <XCity> list)
 {
     using (var ct = new FoodDBContext())
     {
         ct.XCitys.AddRange(list);
         return(ct.SaveChanges());
     }
 }