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

RevEng: Use unbound NavProps on the IModel instead of annotations #5432

Closed
wants to merge 1 commit into from

Conversation

lajones
Copy link
Contributor

@lajones lajones commented May 19, 2016

Fix for #5154. This is clean up - no change to output from Scaffolding. Now that you can add "shadow" NavProps to an IModel we make use of them so we can stop using the artificial ScaffoldingForeignKeyAnnotations.

Change to ForeignKey is just cleaning up a whitespace problem I saw when I was doing this.

RelationalScaffoldingModelFactory and then drawing the names directly from
there which allows us to stop using the ScaffoldingForeignKeyAnnotations
altogether.
@lajones
Copy link
Contributor Author

lajones commented May 19, 2016

Note for provider-writers: if you previously were using ScaffoldingForeignKeyAnnotations to store navigation property names, you'll have to update to use foreignKey.HasDependentToPrincipal() and foreignKey.HasPrincipalToDependent() instead.

var principalEndNavigationPropertyName =
foreignKey.Scaffolding().PrincipalEndNavigation;
var dependentEndNavigationPropertyName = foreignKey.DependentToPrincipal.Name;
var principalEndNavigationPropertyName = foreignKey.PrincipalToDependent.Name;
Copy link
Contributor

Choose a reason for hiding this comment

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

null check for navigations needed?

Copy link
Contributor Author

@lajones lajones May 23, 2016

Choose a reason for hiding this comment

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

@smitpatel Will do. After that can I convert the LGTM to a ship-it?

@smitpatel
Copy link
Contributor

LGTM.

@smitpatel
Copy link
Contributor

If someone else wants to review otherwise :shipit:

@lajones
Copy link
Contributor Author

lajones commented May 23, 2016

Checked in with commit 767b3dd.

@lajones lajones closed this May 23, 2016
@lajones lajones deleted the 160518-lajones_5154_NavPropsInModel_01 branch May 23, 2016 20:21
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.

3 participants