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