Continues core Domain structure modeling

This commit is contained in:
BinaryAlley committed 2024-08-23 10:07:04 +03:00
1 parent c39652066e
commit 50c15cf889
54 files changed
+2318 -159

No files matched your search

@@ -4,16 +4,20 @@
/// Base class for all domain Aggregate Roots.
/// </summary>
/// <typeparam name="TId">The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type.</typeparam>
/// <typeparam name="TIdType">The type of the unique identifier for the Aggregate Root. It should be a non-nullable type.</typeparam>
public abstract class AggregateRoot<TId, TIdType> : Entity<TId> where TId : notnull, AggregateRootId<TIdType>
where TIdType : notnull
{
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets the unique identifier of the Aggregate Root.
/// </summary>
public new AggregateRootId<TIdType> Id { get; protected set; }
#endregion
#region ====================================================================== CTOR =====================================================================================
/// <summary>
/// Overload C-tor.
/// Initializes a new instance of the <see cref="AggregateRoot{TId, TIdType}"/> class.
/// </summary>
/// <param name="id">The id of the entity.</param>
protected AggregateRoot(TId id) : base(id)
@@ -22,6 +26,9 @@ public abstract class AggregateRoot<TId, TIdType> : Entity<TId> where TId : notn
}
#pragma warning disable CS8618
/// <summary>
/// Initializes a new instance of the <see cref="AggregateRoot{TId, TIdType}"/> class.
/// </summary>
protected AggregateRoot() // only needed during reflection
{