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