исправил models

This commit is contained in:
maxnes3 2023-04-07 23:33:56 +04:00
parent 82296e3d23
commit be1b5b1a1c
3 changed files with 8 additions and 0 deletions

View File

@ -34,9 +34,13 @@ namespace CaseAccountingDataBaseImplement.Models
[Required]
public int SpecializationId { get; set; }
public virtual Specialization Specialization { get; set; } = new();
[Required]
public int UserId { get; set; }
public virtual User User { get; set; } = new();
[ForeignKey("CaseId")]
public virtual List<Hearing> Hearings { get; set; } = new();

View File

@ -28,6 +28,8 @@ namespace CaseAccountingDataBaseImplement.Models
[Required]
public int UserId { get; set; }
public virtual User User { get; set; } = new();
[ForeignKey("ContractId")]
public virtual List<LawyerContracts> LawyerContracts { get; set; } = new();

View File

@ -27,6 +27,8 @@ namespace CaseAccountingDataBaseImplement.Models
[Required]
public int UserId { get; set; }
public virtual User User { get; set; } = new();
[ForeignKey("DealId")]
public virtual List<CaseDeal> CaseDeals { get; set; } = new();