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

Attribute for configuring DeleteBehavior #27630

Merged
merged 34 commits into from
May 18, 2022
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2929859
Add DeleteBehaviorAttribute
Vekz Mar 10, 2022
25bf1d8
Add DeleteBehaviorAttribute Convention that sets delete behavior on f…
Vekz Mar 10, 2022
a903461
Register DeleteBehaviorAttributeConvention in ConventionSet provider
Vekz Mar 10, 2022
88b2376
Add tests for DeleteBehaviorAttribute
Vekz Mar 11, 2022
9ac476a
Make DeleteBehaviorAttribute a property or field attribute
Vekz Mar 11, 2022
c410304
Make changes to detect added foreign key
Vekz Mar 11, 2022
3a1693d
Add new registration in ConventionSet provider
Vekz Mar 11, 2022
6a59b7a
Add more test cases for different edge cases
Vekz Mar 11, 2022
7dc5a6f
Add more edge cases to tests
Vekz Mar 11, 2022
46d054b
Add test case for implicit foreign key
Vekz Mar 11, 2022
c454830
Cleanup convention and registration in provider
Vekz Mar 11, 2022
ac25537
Move DeleteBehavior enum and add TypeForward
Vekz Mar 11, 2022
e2aed9a
Make DeleteBehaviorAttribute code and tests use DeleteBehavior enum
Vekz Mar 11, 2022
fb34679
Add EFCore.Abstractions assembly to fix tests after TypeForwarding De…
Vekz Mar 11, 2022
c0e9b70
Make DeleteBehaviorAttribute descriptions more meaningful
Vekz Mar 23, 2022
95cc27e
Change formatting in DeleteBehaviorAttributeConvention and fix incorr…
Vekz Mar 23, 2022
12d700e
Simplify test suite for DeleteBehaviorAttribute and do some minor for…
Vekz Mar 23, 2022
8168b9f
Make tests reflect setting the attribute on navigation property
Vekz Mar 23, 2022
7e6d766
Take attribute value from being set on dependent navigation property …
Vekz Mar 23, 2022
af2e118
Limit use of the attribute to only properties to accomodate only sett…
Vekz Mar 23, 2022
256cb54
Throw InvalidOperationException when DeleteBehaviorAttribute is set o…
Vekz Mar 24, 2022
599f191
Add tests for when Attribute is set on different property than naviga…
Vekz Mar 24, 2022
4c71154
Make sure attribute is set only from dependent side
Vekz Apr 20, 2022
195673a
Make xml comments docs more readable
Vekz Apr 20, 2022
a92c66a
Simplify the convention
Vekz Apr 20, 2022
5357529
Add navigation attribute convention tests and adjust code to work cor…
Vekz Apr 21, 2022
8d9d189
Implement 1:1 relations delete behavior setting and restriction to th…
Vekz May 15, 2022
3a1da1d
Add 1:1 relationship tests and implement suggestions from PR
Vekz May 17, 2022
28b09bb
Add stylistic changes suggested by PR and IDE
Vekz May 18, 2022
665fdd8
Fix CoreStrings.resx merge conflicts
Vekz May 18, 2022
02860a3
Fix CoreStrings.resx merge conflicts
Vekz May 18, 2022
0460b8a
Merge branch 'main' into 9621_DeleteBehaviorAttribute
Vekz May 18, 2022
6fc84c1
Run Custom Tool on CoreStrings.Designer.tt
Vekz May 18, 2022
4cb7491
Add virtual modifier to the DeleteBehaviorAttributeConvention's publi…
Vekz May 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add new registration in ConventionSet provider
Vekz committed Mar 11, 2022
commit 3a1693d43445d56cfe328f6f589caff1107c207d
Original file line number Diff line number Diff line change
@@ -150,6 +150,7 @@ public virtual ConventionSet CreateConventionSet()
conventionSet.ForeignKeyAddedConventions.Add(valueGeneratorConvention);
conventionSet.ForeignKeyAddedConventions.Add(cascadeDeleteConvention);
conventionSet.ForeignKeyAddedConventions.Add(foreignKeyIndexConvention);
conventionSet.ForeignKeyAddedConventions.Add(deleteBehaviorAttributeConvention);

conventionSet.ForeignKeyRemovedConventions.Add(baseTypeDiscoveryConvention);
conventionSet.ForeignKeyRemovedConventions.Add(relationshipDiscoveryConvention);