Ejemplo n.º 1
0
 public IEnumerable <T> FindBy(Expression <Func <T, bool> > predicate)
 {
     if (typeof(T) == typeof(CartDetail))
     {
         context.CartDetail_releaseCartData();//Note:release cart detail which are more than 1hour existed by last item of an employee
         context = new LUSSISContext();
     }
     context = new LUSSISContext();
     return(context.Set <T>().Where(predicate).ToList());
 }
Ejemplo n.º 2
0
 public T FindById(ID id)
 {
     context = new LUSSISContext();
     if (typeof(T) == typeof(CartDetail))
     {
         context.CartDetail_releaseCartData();//Note:release cart detail which are more than 1hour existed by last item of an employee
         context = new LUSSISContext();
     }
     return(context.Set <T>().Find(id));
 }
Ejemplo n.º 3
0
 public IEnumerable <T> FindAll()
 {
     context = new LUSSISContext();
     if (typeof(T) == typeof(CartDetail))
     {
         context.CartDetail_releaseCartData();//Note:release cart detail which are more than 1hour existed by last item of an employee
         context = new LUSSISContext();
     }
     return(context.Set <T>().ToList <T>());
 }