public IQueryable<ServiceCategory> GetCategories() { IQueryable<ServiceCategory> list; switch (sectionName) { case "personal": list= _servicesServices.GetCategoriesList(LanguageId).Where(s => s.HasPersonalServices).AsQueryable(); break; case "business": list = _servicesServices.GetCategoriesList(LanguageId).Where(s => s.HasBusinessServices).AsQueryable(); break; default: list = _servicesServices.GetCategoriesList(LanguageId).Where(s => s.HasPersonalServices|| s.HasPersonalServices).AsQueryable(); break; } return list;// _servicesServices.GetCategoriesList(LanguageId).Where(s=>s.Sections.Contains(typeId.ToString())||s.Sections=="1").AsQueryable(); }
private int typeId = 1;//2=personal 3=business public category() { TryGetRouteParameter("CategoryId", out categoryId); TryGetRouteParameter("Section", out sectionName); TryGetRouteParameter("UrlName", out urlName); _servicesServices = new ServicesServices(); CategoryName = _servicesServices.GetCategoriesList(LanguageId).First(c => c.Id == categoryId.Value).Name; }
public IQueryable <Khadmatcom.Services.Model.ServiceCategory> GetCategories() { return(_servicesServices.GetCategoriesList(LanguageId).AsQueryable()); }
public IQueryable <ServiceCategory> GetCategories() { return(_servicesServices.GetCategoriesList(LanguageId).AsQueryable()); }