Exemple #1
0
        public async Task <OdataApiResponse <TResult> > SendReqeust()
        {
            var uri      = CreateRequestUrl();
            var response = await SendRequestAsnyc(HttpClient, uri);

            if (QueryOptions.Take.HasValue || QueryOptions.Skip.HasValue)
            {
                var(count, data) = await ResultParser.ParseCountedAsync(response);

                return(new OdataApiResponse <TResult>(Projection(data), count, response));
            }
            else
            {
                var data = await ResultParser.ParseAsync(response);

                return(new OdataApiResponse <TResult>(Projection(data), null, response));
            }
        }