public T Sorgu <T>(string ad)
        {
            if (!İstekErişilebilir())
            {
                return(default(T));
            }

            if (StringValues.IsNullOrEmpty(_httpContextAccessor.HttpContext.Request.Query[ad]))
            {
                return(default(T));
            }

            return(GenelYardımcı.To <T>(_httpContextAccessor.HttpContext.Request.Query[ad].ToString()));
        }
Beispiel #2
0
        public T Sorgu <T>(string ad)
        {
            string sorguDeğeri = null;

            if (İstekErişilebilir(_httpContext) && _httpContext.Request.QueryString[ad] != null)
            {
                sorguDeğeri = _httpContext.Request.QueryString[ad];
            }

            if (!String.IsNullOrEmpty(sorguDeğeri))
            {
                return(GenelYardımcı.To <T>(sorguDeğeri));
            }

            return(default(T));
        }