From d1fc181b082e38f3e494a0f7b127e476a0decb20 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Wed, 29 May 2024 13:55:20 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D1=80=D0=B5=D1=88=D0=B8?= =?UTF-8?q?=D0=BB=20null=20=D0=B2=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D1=8F?= =?UTF-8?q?=D1=85=20=D0=B1=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PolyclinicDatabaseImplement/Models/CourseDiagnose.cs | 4 ++-- Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs | 2 +- Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs | 2 +- .../PolyclinicDatabaseImplement/Models/RecipeProcedure.cs | 4 ++-- .../PolyclinicDatabaseImplement/Models/SymptomDiagnose.cs | 4 ++-- .../PolyclinicDatabaseImplement/Models/SymptomRecipe.cs | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) 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; } } }