public static List <tblCategory> GetMenus()
 {
     using (var context = new EasyElecDBEntities())
     {
         return(context.tblCategories.ToList());
     }
 }
 public static List <tblCategory> GetSubMenus(int menuid)
 {
     using (var context = new EasyElecDBEntities())
     {
         return(context.tblCategories.Where(u => u.CategoryId == menuid).ToList());
     }
 }
示例#3
0
 public static List <tblProduct> GetAudio()
 {
     using (var context = new EasyElecDBEntities())
     {
         return(context.tblProducts.OrderByDescending(e => e.ProductId).Where(s => s.CategoryId == 3).Take(4).ToList());
     }
 }
示例#4
0
 public static List <tblProduct> GetAllSpecialItem()
 {
     using (var context = new EasyElecDBEntities())
     {
         return(context.tblProducts.OrderByDescending(e => e.ProductId).Where(s => s.IsSpecial == true).Take(8).ToList());
     }
 }
示例#5
0
 public static List <tblProduct> GetAllItems()
 {
     using (var context = new EasyElecDBEntities())
     {
         return(context.tblProducts.Where(s => s.IsSpecial == false).Take(3).ToList());
     }
 }