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.
This commit is contained in:
2025-12-10 11:48:59 +01:00
parent f9a4d93495
commit 141e77f315

View File

@@ -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; }
}