public List <T> Load <T>() where T : class { using (FitnessContext db = new FitnessContext()) { return(db.Set <T>().Where(_ => true).ToList()); } }
public List <T> Load <T>(string fileName) where T : class { using (var db = new FitnessContext()) { return(db.Set <T>().ToList()); } }
public void Save <T>(List <T> item) where T : class { using (FitnessContext db = new FitnessContext()) { db.Set <T>().AddRange(item); db.SaveChanges(); } }