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