Refactor namespaces and simplify DTOs

Updated namespaces to align with the new DigitalData.Core structure, replacing `DigitalData.Core.Abstractions` with `DigitalData.Core.Application.Interfaces` and `DigitalData.Core.Client.Interface`. Removed the `IUnique<int>` interface from several DTOs, simplifying their design and altering the handling of entity identification. Updated project files to reflect new dependency versions for improved compatibility and features. Cleaned up using directives to remove obsolete references, enhancing code maintainability.
This commit is contained in:
Developer 02
2025-05-20 15:14:58 +02:00
parent 1b923dc93b
commit 08e1187124
52 changed files with 73 additions and 104 deletions

View File

@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Domain.Entities
{
@@ -22,10 +21,5 @@ namespace EnvelopeGenerator.Domain.Entities
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
public string ExportPath { get; set; }
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
[NotMapped]
[JsonIgnore]
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single table in the database.");
}
}

View File

@@ -46,7 +46,7 @@ namespace EnvelopeGenerator.Domain.Entities
public string PhoneNumber { get; set; }
[NotMapped]
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
public Tuple<int, int> Id => Tuple.Create(EnvelopeId, ReceiverId);
[NotMapped]
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);