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

Metadata: Configure backing field by attribute on skip navigation #21864

Merged
2 commits merged into from
Jul 31, 2020
Merged

Conversation

smitpatel
Copy link
Member

No description provided.

@smitpatel smitpatel force-pushed the smit/skip1 branch 2 times, most recently from d1139af to 633f965 Compare July 30, 2020 23:42
@AndriySvyryd
Copy link
Member

You missed IConventionServicePropertyBuilder

@smitpatel
Copy link
Member Author

Related test question:
I had to add "new" in actual builders since return type differs. But the ones returning bool are needed for that purpose. But test is failing asking me to add those too. Should I add CanSet methods with new in each of the builder too?

Doesn't this mean that we are writing a lot more code to DRY little code somewhere? :trollface:

@AndriySvyryd
Copy link
Member

But the ones returning bool are needed for that purpose. But test is failing asking me to add those too. Should I add CanSet methods with new in each of the builder too?

You should modify the test to look for the methods on base interfaces as well, or just add an exception

Doesn't this mean that we are writing a lot more code to DRY little code somewhere? :trollface:

Hopefully this refactoring allows to DRY more places

We were not checking collection navigations which are initialized inline and without setter.
This worked fine for most part as
- One sided collection were always added by convention
- When there were multiple pairs and convention failed, opposite side had reference navigation which would end up throwing
- Many to Many brings a twist that there is no reference on other side so in case we fail to add many to many skip navigations by convention, we would not throw.
@smitpatel smitpatel changed the base branch from main to smit/throwcorrectly July 31, 2020 01:27
Base automatically changed from smit/throwcorrectly to main July 31, 2020 05:04
@smitpatel
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ghost
Copy link

ghost commented Jul 31, 2020

Hello @smitpatel!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 28f372a into main Jul 31, 2020
@ghost ghost deleted the smit/skip1 branch July 31, 2020 07:28
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants