Exemple #1
0
        internal static string AddQueryParams <T>(this string uri, T model)
        {
            foreach (var prop in model.GetType().GetProperties())
            {
                var value          = prop.GetValue(model);
                var queryParamName = AttributeHelpers.GetQueryParamName <T>(prop.Name);
                if (value != null)
                {
                    uri = uri.AddQueryParam(queryParamName, value);
                }
            }

            return(uri);
        }