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:
@@ -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; }
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@ namespace ReC.Domain.QueryOutput;
|
||||
|
||||
public class InsertObjectResult
|
||||
{
|
||||
[Column("oGUID")]
|
||||
public required long NewObjectId { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user