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