コード例 #1
0
 public static List <tblItem> GetAllFoodRecentItem()
 {
     using (var context = new OnlineFoodDBEntities())
     {
         return(context.tblItems.Take(8).ToList());
     }
 }
コード例 #2
0
 public static List <tblSubMenu> GetMenus()
 {
     using (var context = new OnlineFoodDBEntities())
     {
         return(context.tblSubMenus.ToList());
     }
 }
コード例 #3
0
 public static List <tblItem> GetAllRecentItem()
 {
     using (var context = new OnlineFoodDBEntities())
     {
         return(context.tblItems.Where(s => s.IsAvailable == "Special").Take(8).ToList());
     }
 }
コード例 #4
0
 public static List <tblSubMenu> GetSubMenus(int menuid)
 {
     using (var context = new OnlineFoodDBEntities())
     {
         return(context.tblSubMenus.Where(u => u.SubMenuId == menuid).ToList());
     }
 }