Разрешил null в моделях бд
This commit is contained in:
parent
92e74d1d7d
commit
d1fc181b08
@ -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; }
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user