-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish
EntityUpdatedEvent
when navigation changes.
- Loading branch information
Showing
17 changed files
with
407 additions
and
26 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/AbpEntityChangeOptions.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,10 @@ | ||
namespace Volo.Abp.Domain.Entities.Events; | ||
|
||
public class AbpEntityChangeOptions | ||
{ | ||
/// <summary> | ||
/// Default: true. | ||
/// Publish the EntityUpdatedEvent when any navigation property changes. | ||
/// </summary> | ||
public bool PublishEntityUpdatedEventWhenNavigationChanges { get; set; } = true; | ||
} |
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
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
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
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
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
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
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
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
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
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
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
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
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
67 changes: 67 additions & 0 deletions
67
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/AppEntityWithNavigations.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,67 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Volo.Abp.Domain.Entities; | ||
using Volo.Abp.Domain.Values; | ||
|
||
namespace Volo.Abp.TestApp.Domain; | ||
|
||
public class AppEntityWithNavigations : AggregateRoot<Guid> | ||
{ | ||
protected AppEntityWithNavigations() | ||
{ | ||
|
||
} | ||
|
||
public AppEntityWithNavigations(Guid id, string name) | ||
: base(id) | ||
{ | ||
Name = name; | ||
FullName = name; | ||
} | ||
|
||
public string Name { get; set; } | ||
|
||
public string FullName { get; set; } | ||
|
||
public AppEntityWithValueObjectAddress AppEntityWithValueObjectAddress { get; set; } | ||
|
||
public virtual AppEntityWithNavigationChildOneToOne OneToOne { get; set; } | ||
|
||
public virtual List<AppEntityWithNavigationChildOneToMany> OneToMany { get; set; } | ||
|
||
public virtual List<AppEntityWithNavigationChildManyToMany> ManyToMany { get; set; } | ||
} | ||
|
||
public class AppEntityWithValueObjectAddress : ValueObject | ||
{ | ||
public AppEntityWithValueObjectAddress(string country) | ||
{ | ||
|
||
Country = country; | ||
} | ||
|
||
public string Country { get; set; } | ||
|
||
protected override IEnumerable<object> GetAtomicValues() | ||
{ | ||
yield return Country; | ||
} | ||
} | ||
|
||
|
||
public class AppEntityWithNavigationChildOneToOne : Entity<Guid> | ||
{ | ||
public string ChildName { get; set; } | ||
} | ||
|
||
public class AppEntityWithNavigationChildOneToMany : Entity<Guid> | ||
{ | ||
public Guid AppEntityWithNavigationId { get; set; } | ||
|
||
public string ChildName { get; set; } | ||
} | ||
|
||
public class AppEntityWithNavigationChildManyToMany : Entity<Guid> | ||
{ | ||
public string ChildName { get; set; } | ||
} |
Oops, something went wrong.