Beispiel #1
0
        private string GetQueryString(ODataDynamicParameters dp, string filter)
        {
            var parts = from part in new[]
            {
                GetQueryStringForFilter(filter),
                GetQueryStringForTop(dp.Top),
                GetQueryStringForOrderBy(dp.OrderBy, dp.Descending),
                GetQueryStringForExpand(dp.Expand),
                GetQueryStringForSelect(dp.Select),
                GetQueryStringForSkip(dp.Skip)
            }
            where !String.IsNullOrEmpty(part)
            select part;

            if (!parts.Any())
            {
                return(null);
            }
            return(String.Join("&", parts.ToArray()));
        }
Beispiel #2
0
 private string GetQueryString(ODataDynamicParameters dp, string filter)
 {
     var parts = from part in new[]
                                  {
                                      GetQueryStringForFilter(filter),
                                      GetQueryStringForTop(dp.Top),
                                      GetQueryStringForOrderBy(dp.OrderBy, dp.Descending),
                                      GetQueryStringForExpand(dp.Expand),
                                      GetQueryStringForSelect(dp.Select),
                                      GetQueryStringForSkip(dp.Skip)
                                  }
                 where !String.IsNullOrEmpty(part)
                 select part;
     if( ! parts.Any())
     {
         return null;
     }
     return String.Join("&", parts.ToArray());
 }