-
Notifications
You must be signed in to change notification settings - Fork 227
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
Views handling #432
Views handling #432
Conversation
Thanks Jehoel. |
Yes, ForeignKey.FkTableNameFiltered is unused and can be removed. PkTableNameFiltered is used an cannot be removed. The 'Generator' project on the ef.core branch is not on it's feet yet, and still needs time to stabilize before I could accept merges into that. |
Amazing work. Thanks Dai. |
Thank you for the kind words :) I'll say I feel a bit uncertain about the defaults I chose where |
Released in v2.37.0 |
See issue #431
This change introduces two separate, but complimentary, features:
Settings.ViewProcessing
- a callback modified by consumers to manually define primary-keys inVIEW
s to override the default behavior of setting all non-null columns as primary-key columns.Settings.AddForeignKeys
- a callback modified by consumers to add additional foreign-key relationships so that strongly-typed navigation properties are added by the T4 template.AddRelationship
- a helper function called from insideAddForeignKeys
that simplifies the definition of foreign-keys, especially whenVIEW
s are involved.It also makes a few other changes:
__RefactorLog
to the list of tables to exclude from POCO generation.ForeignKey.FkTableNameFiltered
I think it's ready to be merged into
master
, but I did leave a TODO in there because I feel the code could be simplified, for example do we needPkTableNameFiltered
?