예제 #1
0
 public List <T> Load <T>() where T : class
 {
     using (var db = new SkladContext())
     {
         return(db.Set <T>().Where(t => true).ToList <T>());
     }
 }
예제 #2
0
 public void save <T>(List <T> item) where T : class
 {
     using (var db = new SkladContext())
     {
         db.Set <T>().AddRange(item);
         db.SaveChanges();
     }
 }