private List <CafeDto> GetBaseCafesQuery() { //DataSet dataSet = new DataQuery("DancingGoatMvc.Cafe.GetAllCafe") // .Execute(); //DataSet dataSet1 = ConnectionHelper.ExecuteQuery("Proc_Custom_GetAllUsers", null, QueryTypeEnum.StoredProcedure); return(CafeProvider.GetCafes() .OrderBy("NodeOrder") .AsEnumerable() .Select(x => { return new CafeDto() { CafeID = x.CafeID, CafeName = x.CafeName, CafeIsCompanyCafe = x.CafeIsCompanyCafe, CafeStreet = x.CafeStreet, CafeCity = x.CafeCity, CafeCountry = x.CafeCountry, CafeZipCode = x.CafeZipCode, CafePhone = x.CafePhone, CafeAdditionalNotes = x.CafeAdditionalNotes }; }) .ToList()); }
/// <summary> /// Returns an enumerable collection of partner cafes ordered by a position in the content tree. /// </summary> /// <returns>An enumerable collection of partner cafes ordered by a position in the content tree.</returns> public IEnumerable <Cafe> GetPartnerCafes() { return(CafeProvider.GetCafes() .LatestVersion(mLatestVersionEnabled) .Published(!mLatestVersionEnabled) .OnSite(mSiteName) .Culture(mCultureName) .WhereFalse("CafeIsCompanyCafe") .OrderBy("NodeOrder")); }
/// <summary> /// Shared <see cref="DocumentQuery"/> for querying cafes. /// </summary> private DocumentQuery <Cafe> GetBaseCafesQuery() { return(CafeProvider.GetCafes() .LatestVersion(mLatestVersionEnabled) .Published(!mLatestVersionEnabled) .OnSite(SiteContext.CurrentSiteName) .Culture(mCultureName) .CombineWithDefaultCulture() .OrderBy("NodeOrder")); }
/// <summary> /// Returns an enumerable collection of company cafes ordered by a position in the content tree. /// </summary> /// <param name="count">The number of cafes to return.</param> /// <returns>An enumerable collection that contains the specified number of cafes ordered by a position in the content tree.</returns> public IEnumerable <Cafe> GetCompanyCafes(int count = 0) { return(CafeProvider.GetCafes() .LatestVersion(mLatestVersionEnabled) .Published(!mLatestVersionEnabled) .OnSite(mSiteName) .Culture(mCultureName) .WhereTrue("CafeIsCompanyCafe") .OrderBy("NodeOrder") .TopN(count)); }
/// <summary> /// Returns an enumerable collection of partner cafes ordered by a position in the content tree. /// </summary> /// <returns>An enumerable collection of partner cafes ordered by a position in the content tree.</returns> public IEnumerable <Cafe> GetPartnerCafes() { return(CafeProvider.GetCafes() .LatestVersion(mLatestVersionEnabled) .Published(!mLatestVersionEnabled) .OnSite(SiteContext.CurrentSiteName) .Culture(mCultureName) .CombineWithDefaultCulture() .WhereFalse("CafeIsCompanyCafe") .OrderBy("NodeOrder") .ToList()); }
private List <CafeModel> GetBaseCafesQuery() { return(CafeProvider.GetCafes() .OrderBy("NodeOrder") .AsEnumerable() .Select(x => { return new CafeModel() { CafeID = x.CafeID, CafeName = x.CafeName, CafeIsCompanyCafe = x.CafeIsCompanyCafe, CafeStreet = x.CafeStreet, CafeCity = x.CafeCity, CafeCountry = x.CafeCountry, CafeZipCode = x.CafeZipCode, CafePhone = x.CafePhone, CafeAdditionalNotes = x.CafeAdditionalNotes }; }) .ToList()); }