Example #1
0
 public static List <tblProduct> GetAllItems()
 {
     using (var context = new eveningDBEntities())
     {
         return(context.tblProducts.Take(8).ToList());
     }
 }
Example #2
0
 public static List <tblProduct> GetAllSpecialItem()
 {
     using (var context = new eveningDBEntities())
     {
         return(context.tblProducts.OrderByDescending(e => e.ProductId).Where(s => s.IsSpecial == true).Take(8).ToList());
     }
 }
Example #3
0
 public static List <tblCategory> GetMenus()
 {
     using (var context = new eveningDBEntities())
     {
         return(context.tblCategories.ToList());
     }
 }