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(); } }