-
Notifications
You must be signed in to change notification settings - Fork 54
Update to emit transformed NavPropertyNames #102
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
Conversation
tonysneed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After making these two changes, please squash your commits into one, then force push the commit to your branch.
After this I will merge your PR. Thanks!
| canUseDataAnnotations = false; | ||
| lines.Add( | ||
| $".{nameof(ReferenceReferenceBuilder.HasPrincipalKey)}" | ||
| + (foreignKey.IsUnique ? $"<{((ITypeBase)foreignKey.PrincipalEntityType).DisplayName()}>" : "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 812 should be:
+ (foreignKey.IsUnique ? $"<{EntityTypeTransformationService.TransformPropertyName(((ITypeBase)foreignKey.PrincipalEntityType).DisplayName())}>" : "")There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmayhak You still need to make this change, so that generic type arguments are transformed.
|
|
||
| lines.Add( | ||
| $".{nameof(ReferenceReferenceBuilder.HasForeignKey)}" | ||
| + (foreignKey.IsUnique ? $"<{((ITypeBase)foreignKey.DeclaringEntityType).DisplayName()}>" : "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 818 should be:
+ (foreignKey.IsUnique ? $"<{EntityTypeTransformationService.TransformPropertyName(((ITypeBase)foreignKey.DeclaringEntityType).DisplayName())}>" : "")There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmayhak You still need to make this change, so that generic type arguments are transformed.
|
@dmayhak Would you be able to make the requested changes? |
|
I guess similar modifications are required in HbsCSharpEntityTypeGenerator. |
|
@tonysneed Please check the above. Thanks! |
|
If you run the ScaffoldingSample, with entity.HasOne(d => d.CustomerFoo)
.WithOne(p => p.CustomerSettingFoo)
.HasForeignKey<CustomerSetting>(d => d.CustomerIdFoo)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_CustomerSetting_Customer");Should be Aside from this, everything else looks good, as far as I can tell. |
|
Let me know when you have made these changes, then we can talk about how to prepare your PR for merging. |
|
I think I did in this commit 4906c14 |
|
I’ll run the tests you suggested tomorrow! Thanks for your support! |
|
@codingdna2 I don't see your recent commits (4906c14, 3e16d8f) on this PR branch, which is 'master' in fork by @dmayhak. Can you point me to the branch where you pushed you recent commits? Perhaps you could create a separate PR for your branch? Please see the Contributing Guidelines. |
|
Covered by #118. |
No description provided.