public IEnumerable <T> GetLists() { using (var db = new SALContext()) { return(db.Set <T>().ToList()); } }
public T GetById(int id) { using (var db = new SALContext()) { return(db.Set <T>().FirstOrDefault(x => x.Id == id)); } }
public IEnumerable <T> GetLists() { using (var db = new SALContext()) { var typeList = db.Set <T>().ToList(); return(typeList); } }
public IEnumerable <T> GetByIdPatient(int id) { using (var db = new SALContext()) { var datesList = db.Set <T>().Where(x => x.IdPatient == id).ToList(); return(datesList); } }