Beispiel #1
0
 public T Get(Expression <Func <T, bool> > condition)
 {
     using (var context = new BakeshoppeInventorySystem())
     {
         var record = context.Set <T>().FirstOrDefault(condition);
         return(record);
     }
 }
Beispiel #2
0
 public List <T> GetRange(Expression <Func <T, bool> > condition)
 {
     using (var context = new BakeshoppeInventorySystem())
     {
         var records = context.Set <T>().Where(condition).ToList();
         return(records);
     }
 }
Beispiel #3
0
 public List <T> GetRange()
 {
     using (var context = new BakeshoppeInventorySystem())
     {
         var records = context.Set <T>().ToList();
         return(records);
     }
 }