-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added RelatedEntitiesOnUpdate attribute.
- Loading branch information
1 parent
0b83c2f
commit 1b9d6c5
Showing
2 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/DotNetElements.Core/Core/RelatedEntitiesOnUpdateAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace DotNetElements.Core; | ||
|
||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] | ||
public class RelatedEntitiesOnUpdateAttribute : Attribute | ||
{ | ||
public string[] ReferenceProperties { get; private init; } | ||
|
||
public RelatedEntitiesOnUpdateAttribute(string[] referenceProperties) | ||
{ | ||
ReferenceProperties = referenceProperties; | ||
|
||
} | ||
} | ||
|
||
// todo needed for on update? | ||
//[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] | ||
//public class RelatedEntitiesCollectionsAttribute : Attribute | ||
//{ | ||
// public string[] ReferenceProperties { get; private init; } | ||
|
||
// public RelatedEntitiesCollectionsAttribute(string[] referenceProperties) | ||
// { | ||
// ReferenceProperties = referenceProperties; | ||
|
||
// } | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters