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()); } }
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()); } }
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()); } }
public static List <tblProduct> GetAllItems() { using (var context = new EasyElecDBEntities()) { return(context.tblProducts.Where(s => s.IsSpecial == false).Take(3).ToList()); } }