Add [Column] mapping attributes to query result classes

Added [Column] attributes to properties in BodyQueryResult, HeaderQueryResult, and InsertObjectResult to explicitly map them to their respective database columns. Also included necessary using directives for DataAnnotations.Schema to support these mappings. This enhances ORM compatibility and ensures correct property-to-column mapping.
This commit is contained in:
2026-03-26 10:28:52 +01:00
parent b0d89ceba4
commit b86d0c0f99
3 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
namespace ReC.Domain.QueryOutput;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.QueryOutput;
public class BodyQueryResult
{
[Column("REQUEST_BODY")]
public string? RawBody { get; init; }
}

View File

@@ -1,6 +1,9 @@
namespace ReC.Domain.QueryOutput;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.QueryOutput;
public class HeaderQueryResult
{
[Column("REQUEST_HEADER")]
public string? RawHeader { get; init; }
}

View File

@@ -4,5 +4,6 @@ namespace ReC.Domain.QueryOutput;
public class InsertObjectResult
{
[Column("oGUID")]
public required long NewObjectId { get; set; }
}