From 7bb90df611eae7ef77a6d397dd0fe8f25aedaf10 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Mon, 29 Apr 2024 20:49:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BB=20=D0=B2=D1=81=D0=B5=20=D0=BC=D0=BE=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B8=20=D1=81=D0=BC=D0=B5=D0=B6=D0=BD=D1=8B=D1=85?= =?UTF-8?q?=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=20=D0=BC=D0=BD=D0=BE?= =?UTF-8?q?=D0=B3=D0=B8=D0=B5=20=D0=BA=D0=BE=20=D0=BC=D0=BD=D0=BE=D0=B3?= =?UTF-8?q?=D0=B8=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Models/ProcedureRecipe.cs | 6 ++---- .../Models/SymptomRecipe.cs | 11 ++++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/ProcedureRecipe.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/ProcedureRecipe.cs index c44a4fd..dd0251d 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/ProcedureRecipe.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/ProcedureRecipe.cs @@ -5,13 +5,11 @@ namespace PolyclinicDatabaseImplement.Models public class ProcedureRecipe { public int Id { get; set; } - [Required] public int ProcedureId { get; set; } - [Required] public int RecipeId { get; set; } - public virtual Procedure Procedure { get; set; } - public virtual Recipe Recipe { get; set; } + public virtual Procedure Procedure { get; set; } = new(); + public virtual Recipe Recipe { get; set; } = new(); } } diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs index 2ada977..032ac33 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs @@ -1,6 +1,15 @@ -namespace PolyclinicDatabaseImplement.Models +using System.ComponentModel.DataAnnotations; + +namespace PolyclinicDatabaseImplement.Models { public class SymptomRecipe { + public int Id { get; set; } + [Required] + public int SymptomId { get; set; } + [Required] + public int RecipeId { get; set; } + public virtual Symptom Symptom { get; set; } = new(); + public virtual Recipe Recipe { get; set; } = new(); } }