This commit reorganizes namespaces from `DigitalData.Core.Abstractions` and `DigitalData.Core.DTO` to `DigitalData.Core.Application.Interfaces` and `DigitalData.Core.Application.DTO`, improving maintainability and clarity. Updated using directives across multiple files to reflect the new structure, ensuring functionality remains intact. Project references in `DigitalData.Core.API.csproj` have been consolidated to include the new Application project. Introduced new classes and interfaces such as `BaseDTO`, `CookieConsentSettings`, `DataResult`, `Notice`, and `Result` to enhance data transfer and service result handling. Updated `IRepository`, `ICRUDRepository`, and `IEntityMapper` interfaces to facilitate CRUD operations and entity mapping. Added extension methods in `Extensions.cs` to improve repository usability. New interfaces for HTTP client services have been added, enhancing external API call handling. Overall, these changes reflect a significant restructuring aimed at improving organization and preparing for future development.
17 lines
680 B
C#
17 lines
680 B
C#
namespace DigitalData.Core.Application.DTO
|
|
{
|
|
/// <summary>
|
|
/// Represents a base Data Transfer Object (DTO) with an identifier.
|
|
/// </summary>
|
|
/// <typeparam name="TId">The type of the identifier.</typeparam>
|
|
/// <param name="Id">The identifier of the DTO.</param>
|
|
public record BaseDTO<TId>(TId Id) where TId : notnull
|
|
{
|
|
/// <summary>
|
|
/// Returns the hash code for this instance, based on the identifier.
|
|
/// This override ensures that the hash code is derived consistently from the identifier.
|
|
/// </summary>
|
|
/// <returns>A hash code for the current object, derived from the identifier.</returns>
|
|
public override int GetHashCode() => Id.GetHashCode();
|
|
}
|
|
} |