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

Fix/multiple complex property projection #74

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

cyl102
Copy link
Contributor

@cyl102 cyl102 commented Mar 8, 2019

Hi,

I noticed a bug when selecting multiple Complex properties using the Select statement. Problem is it was using the name of the complex class as the name of the property so that the dictionary will have duplicated keys when selecting multiple complex properties. Instead I tried to create a new unique name by combining the ComplexProperty name with the Property of the Complex object.

I also added a "as" syntax so you can pick your own property name in projection. This also works for simple property selection.

I have also attempted implement a very small portion of the aggregation section of the ODATA specification.

This change supports for example "?$apply=aggregate(Age with min as MinAge,Age with sum as TotalAge)")"

Unfortunately I couldn't figure out how to run the MSpec unit tests with VS2017, so instead I wrote my tests with nunit in the same spirit as the MSpec tests.

I am hoping to have "groupby" working, which is what I really wanted to achieve but its quite difficult.

I also updated .Net version to .Net 4.6.2.

Thanks,

Bobby

Bobby.Lau added 7 commits March 7, 2019 10:58
Couldn' get mspec to run so rerouted some test logic to use nunit.
Previous fix also include fix for selecting multiple complex properties produces error with duplicated key (as the name of the property was the complex property instead of some combination of the complex property and its property.
supports basic property with (aggFunc) as (Alias)

currently support Sum, Average, Min, Max
but failing to find the correct method with dynamic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant