Closed matheus-inacio closed 10 months ago
Implementation of the IForeignKeyPropertiesChangedConvention'.
PS.: The test implemented covers what triggered the issue for me.
EF core does not automatically maps properties without setters. https://github.com/dotnet/efcore/issues/10844#issuecomment-362338017
In case you define an ID without a setter, EF will map it as "Keyless" and add "temp" to the FK constraint names.
Once you define an ID manually, the constraints name are never corrected since ForeignKeyPropertiesChangedConventions is not implemented.
Fixes issues: https://github.com/efcore/EFCore.NamingConventions/issues/148, https://github.com/efcore/EFCore.NamingConventions/issues/198
Pre-existing PR: https://github.com/efcore/EFCore.NamingConventions/pull/149
@matheus-inacio sorry it took so long to get around to this... I've submitted your fix as #244 (as this PR isn't writable), fixing a small test issue.
Thanks for your contribution!
Implementation of the IForeignKeyPropertiesChangedConvention'.
PS.: The test implemented covers what triggered the issue for me.
EF core does not automatically maps properties without setters. https://github.com/dotnet/efcore/issues/10844#issuecomment-362338017
In case you define an ID without a setter, EF will map it as "Keyless" and add "temp" to the FK constraint names.
Once you define an ID manually, the constraints name are never corrected since ForeignKeyPropertiesChangedConventions is not implemented.
Fixes issues: https://github.com/efcore/EFCore.NamingConventions/issues/148, https://github.com/efcore/EFCore.NamingConventions/issues/198
Pre-existing PR: https://github.com/efcore/EFCore.NamingConventions/pull/149