예제 #1
0
 public static List <tblProduct> GetAllSpecialItem()
 {
     using (var context = new VALLEYSTOREDBEntities())
     {
         return(context.tblProducts.OrderByDescending(e => e.ProductId).Where(s => s.IsSpecial == true).Take(4).ToList());
     }
 }
예제 #2
0
 public static List <tblProduct> GetAllItems()
 {
     using (var context = new VALLEYSTOREDBEntities())
     {
         return(context.tblProducts.Where(s => s.IsSpecial == false).Take(4).ToList());
     }
 }
예제 #3
0
 public static List <tblProduct> GetOtherItems()
 {
     using (var context = new VALLEYSTOREDBEntities())
     {
         return(context.tblProducts.OrderByDescending(e => e.ProductId).Where(s => s.CategoryId == 4).Take(4).ToList());
     }
 }
예제 #4
0
 public static List <tblCategory> GetMenus()
 {
     using (var context = new VALLEYSTOREDBEntities())
     {
         return(context.tblCategories.ToList());
     }
 }