Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted all aggregate linq queries to return Response<T> #776

Merged
merged 2 commits into from
Sep 9, 2019

Conversation

j82w
Copy link
Contributor

@j82w j82w commented Sep 6, 2019

…ccess to diagnostics.

Pull Request Template

Description

Converted all aggregate linq queries like CountAsync to return a Response. This will allow users to access the request charge and diagnostics information for the request.

Only the request charge and diagnostics is aggregated. All other fields on Response such as activity id will be null since they can not be aggregated.

Response does have an implicit conversion to type T so users can still do the following:

int intSum = await linqQueryable.Select(item => item.taskNum).SumAsync();

Or

Response<int> intSum = await linqQueryable.Select(item => item.taskNum).SumAsync();
string totalCharge = intSum.RequestCharge;
string diagnosticis = intSum.Diagnostics.ToString();

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@j82w j82w added feature-request New feature or request QUERY LINQ labels Sep 6, 2019
@j82w j82w self-assigned this Sep 6, 2019
@j82w j82w requested review from khdang and bchong95 September 8, 2019 13:09
Copy link
Member

@kirankumarkolli kirankumarkolli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check changelog comment.

changelog.md Show resolved Hide resolved
@kirankumarkolli kirankumarkolli merged commit 96ab2f8 into master Sep 9, 2019
@kirankumarkolli kirankumarkolli deleted the users/jawilley/linq_responses branch September 9, 2019 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request LINQ QUERY
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants