diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/CourseDiagnose.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/CourseDiagnose.cs index 5c8809f..36db203 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/CourseDiagnose.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/CourseDiagnose.cs @@ -9,7 +9,7 @@ namespace PolyclinicDatabaseImplement.Models public int CourseId { get; set; } [Required] public int DiagnoseId { get; set; } - public virtual Course Course { get; set; } = new(); - public virtual Diagnose Diagnose { get; set; } = new(); + public virtual Course? Course { get; set; } + public virtual Diagnose? Diagnose { get; set; } } } diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs index 42cda37..7848b38 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs @@ -17,7 +17,7 @@ namespace PolyclinicDatabaseImplement.Models public DateTime DateStartDiagnose { get; set; } = DateTime.Now; public DateTime? DateStopDiagnose { get; set; } public int Id { get; set; } - public virtual User User { get; set; } = new(); + public virtual User? User { get; set; } public static Diagnose? Create(DiagnoseBindingModel? model) { diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs index f9dfde2..a97c9c8 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs @@ -19,7 +19,7 @@ namespace PolyclinicDatabaseImplement.Models [Required] public DateTime DateStartProcedure { get; set; } = DateTime.Now; public DateTime? DateStopProcedure { get; set; } - public virtual User User { get; set; } = new(); + public virtual User? User { get; set; } public string? Comment { get; set; } = string.Empty; diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/RecipeProcedure.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/RecipeProcedure.cs index 86b5369..dee6a7d 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/RecipeProcedure.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/RecipeProcedure.cs @@ -9,7 +9,7 @@ namespace PolyclinicDatabaseImplement.Models public int ProcedureId { get; set; } [Required] public int RecipeId { get; set; } - public virtual Procedure Procedure { get; set; } = new(); - public virtual Recipe Recipe { get; set; } = new(); + public virtual Procedure? Procedure { get; set; } + public virtual Recipe? Recipe { get; set; } } } diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs index 7d8a399..8d3566b 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs @@ -9,7 +9,7 @@ namespace PolyclinicDatabaseImplement.Models public int SymptomId { get; set; } [Required] public int DiagnoseId { get; set; } - public virtual Symptom Symptom { get; set; } = new(); - public virtual Diagnose Diagnose { get; set; } = new(); + public virtual Symptom? Symptom { get; set; } + public virtual Diagnose? Diagnose { get; set; } } } diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs index 032ac33..4f758d0 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/SymptomRecipe.cs @@ -9,7 +9,7 @@ namespace PolyclinicDatabaseImplement.Models 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(); + public virtual Symptom? Symptom { get; set; } + public virtual Recipe? Recipe { get; set; } } }