Add EF Core data annotations for table and FK mapping

Added [Table] and [ForeignKey] attributes to entity classes to explicitly map them to database tables/views and define relationships. Updated using directives as needed. Improves entity mapping clarity and robustness against schema changes.
This commit is contained in:
2025-12-12 13:55:22 +01:00
parent 46b7ae29cd
commit 6b036f4f91
8 changed files with 32 additions and 7 deletions

View File

@@ -1,5 +1,8 @@
namespace ReC.Domain.Entities;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.Entities;
[Table("TBDD_CONNECTION")]
public class Connection
{
public short? Id { get; set; }