From 141e77f315dcd51d22c2e1a07d7b8c2d443b16c1 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 10 Dec 2025 11:48:59 +0100 Subject: [PATCH] Remove EF Core data annotations from OutRes entity Refactored the OutRes class to eliminate all Entity Framework Core data annotations, including table, key, column, and foreign key attributes. The entity now contains only property definitions, decoupling it from direct database schema mapping and allowing for alternative configuration or usage outside of EF Core. --- src/ReC.Domain/Entities/OutRes.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/ReC.Domain/Entities/OutRes.cs b/src/ReC.Domain/Entities/OutRes.cs index e669f17..060a9b4 100644 --- a/src/ReC.Domain/Entities/OutRes.cs +++ b/src/ReC.Domain/Entities/OutRes.cs @@ -1,37 +1,22 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; +namespace ReC.Domain.Entities; -namespace ReC.Domain.Entities; - -[Table("TBREC_OUT_RESULT", Schema = "dbo")] public class OutRes { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - [Column("GUID")] public long? Id { get; set; } - [Column("ACTION_ID")] public long? ActionId { get; set; } - [ForeignKey("ActionId")] public RecAction? Action { get; set; } - [Column("RESULT_HEADER")] public string? Header { get; set; } - [Column("RESULT_BODY")] public string? Body { get; set; } - [Column("ADDED_WHO")] public string? AddedWho { get; set; } - [Column("ADDED_WHEN")] public DateTime? AddedWhen { get; set; } - [Column("CHANGED_WHO")] public string? ChangedWho { get; set; } - [Column("CHANGED_WHEN")] public DateTime? ChangedWhen { get; set; } }