public HttpResponseMessage GetAuctionsPaged() { //Data subscription'ın geçerliliği kontrolü if (!IsSubscribedDataService()) { return(Request.CreateResponse(HttpStatusCode.UpgradeRequired, "Renew your data subscription!")); } //**** DomainData dd = new DomainData(); AuctionDomainModelWebApiPaged AuctionDomainList = new AuctionDomainModelWebApiPaged(); var ListOfTLDs = Request.Headers.GetValues("ListOfTLDs").FirstOrDefault(); List <string> TLDs = JsonConvert.DeserializeObject <List <string> >(ListOfTLDs); string IsKeyword = Request.Headers.GetValues("IsKeyword").FirstOrDefault(); char AuctionType = Convert.ToChar(Request.Headers.GetValues("AuctionType").FirstOrDefault()); //for paging+filters int NumOfRecPerPage = Convert.ToInt32(Request.Headers.GetValues("NumOfRecPerPage").FirstOrDefault()); int WhichPage = Convert.ToInt32(Request.Headers.GetValues("WhichPage").FirstOrDefault()); char SortBy = Convert.ToChar(Request.Headers.GetValues("SortBy").FirstOrDefault()); string SearchStr = Request.Headers.GetValues("SearchStr").FirstOrDefault(); //**** //for excel bool IsExcel = (Request.Headers.GetValues("IsExcel").FirstOrDefault() == "1") ? true : false; //**** if (IsKeyword == "0") { var MatchCriteria = Request.Headers.GetValues("MatchCriteria").FirstOrDefault(); MatchCriteriaWithPatternModel objMC = JsonConvert.DeserializeObject <MatchCriteriaWithPatternModel>(MatchCriteria); AuctionDomainList = dd.GetFilteredAuctionDomainsPaged(objMC, TLDs, AuctionType, SortBy, SearchStr, NumOfRecPerPage, WhichPage, IsExcel); } if (IsKeyword == "1") { string IncludeHyphens = Request.Headers.GetValues("IncludeHyphens").FirstOrDefault(); string IncludeNumbers = Request.Headers.GetValues("IncludeNumbers").FirstOrDefault(); var Keywords = Request.Headers.GetValues("Keywords").FirstOrDefault(); List <KeywordModel> objKeywords = JsonConvert.DeserializeObject <List <KeywordModel> >(Keywords); AuctionDomainList = dd.GetAuctionDomainsByKeywordsPaged(IncludeHyphens, IncludeNumbers, objKeywords, TLDs, AuctionType, SortBy, SearchStr, NumOfRecPerPage, WhichPage, IsExcel); } return(Request.CreateResponse(HttpStatusCode.OK, AuctionDomainList)); }