Exemplo n.º 1
0
        public ActionResult <ResponseStruct <Advertisement> > getAds(string userToken = null, string requestToken = null, int pageNo = 1, int isPaid = 3, int catID = 0, string searchQuery = "", double minPrice = 0, double maxPrice = 0)
        {
            var    ipAddress = HttpContext.Connection.RemoteIpAddress;
            string tokens    = "";

            if (!string.IsNullOrEmpty(userToken) && !string.IsNullOrEmpty(requestToken))
            {
                tokens = $@"userToken = { userToken}
requestToken = {requestToken}";
            }

            communication.log($@"{tokens}
catID = {catID}
pageNo = {pageNo}
isPaid = {isPaid}
catID = {catID}
searchQuery = {searchQuery}
minPrice = {minPrice}
maxPrice = {maxPrice}", MethodBase.GetCurrentMethod().Name, ipAddress.ToString());
            DbSelect select = new DbSelect(Configuration, _hostingEnvironment);

            return(Ok(select.GetAdvertisements(userToken, requestToken, pageNo, isPaid, catID, minPrice, maxPrice, searchQuery)));
        }