From f6d00c23bce3b1496173dd3d164b1d5e17ba700d Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:13:29 +0400 Subject: [PATCH 1/2] fix statement binding model --- .../UniversityContracts/BindingModels/StatementBindingModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/University/UniversityContracts/BindingModels/StatementBindingModel.cs b/University/UniversityContracts/BindingModels/StatementBindingModel.cs index 6511262..7cf9d4f 100644 --- a/University/UniversityContracts/BindingModels/StatementBindingModel.cs +++ b/University/UniversityContracts/BindingModels/StatementBindingModel.cs @@ -2,7 +2,7 @@ namespace UniversityContracts.BindingModels { - public class StatementBindingModel : IStudentModel + public class StatementBindingModel : IStatementModel { public int Id { get; set; } public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); From 37070beac2de139004332c6bbcf1a06d17bd97db Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Fri, 7 Apr 2023 16:03:41 +0400 Subject: [PATCH 2/2] add dictionaries in models --- .../UniversityContracts/BindingModels/StatementBindingModel.cs | 1 + .../UniversityContracts/BindingModels/StudentBindingModel.cs | 1 + University/UniversityContracts/ViewModels/StatementViewModel.cs | 1 + University/UniversityContracts/ViewModels/StudentViewModel.cs | 1 + University/UniversityDataModels/Models/IStatementModel.cs | 1 + University/UniversityDataModels/Models/IStudentModel.cs | 1 + 6 files changed, 6 insertions(+) diff --git a/University/UniversityContracts/BindingModels/StatementBindingModel.cs b/University/UniversityContracts/BindingModels/StatementBindingModel.cs index 7cf9d4f..d584937 100644 --- a/University/UniversityContracts/BindingModels/StatementBindingModel.cs +++ b/University/UniversityContracts/BindingModels/StatementBindingModel.cs @@ -7,5 +7,6 @@ namespace UniversityContracts.BindingModels public int Id { get; set; } public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); public int HoursCount { get; set; } + public Dictionary Students { get; set; } = new(); } } diff --git a/University/UniversityContracts/BindingModels/StudentBindingModel.cs b/University/UniversityContracts/BindingModels/StudentBindingModel.cs index 03cf631..26869e3 100644 --- a/University/UniversityContracts/BindingModels/StudentBindingModel.cs +++ b/University/UniversityContracts/BindingModels/StudentBindingModel.cs @@ -7,5 +7,6 @@ namespace UniversityContracts.BindingModels public int Id { get; set; } public string Name { get; set; } = String.Empty; public string RecordCardNumber { get; set; } = String.Empty; + public Dictionary Results { get; set; } = new(); } } diff --git a/University/UniversityContracts/ViewModels/StatementViewModel.cs b/University/UniversityContracts/ViewModels/StatementViewModel.cs index 728fb53..b3ded91 100644 --- a/University/UniversityContracts/ViewModels/StatementViewModel.cs +++ b/University/UniversityContracts/ViewModels/StatementViewModel.cs @@ -7,5 +7,6 @@ namespace UniversityContracts.ViewModels public int Id { get; set; } public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); public int HoursCount { get; set; } + public Dictionary Students { get; set; } = new(); } } diff --git a/University/UniversityContracts/ViewModels/StudentViewModel.cs b/University/UniversityContracts/ViewModels/StudentViewModel.cs index 2ff6158..141b33e 100644 --- a/University/UniversityContracts/ViewModels/StudentViewModel.cs +++ b/University/UniversityContracts/ViewModels/StudentViewModel.cs @@ -7,5 +7,6 @@ namespace UniversityContracts.ViewModels public int Id { get; set; } public string Name { get; set; } = String.Empty; public string RecordCardNumber { get; set; } = String.Empty; + public Dictionary Results { get; set; } = new(); } } diff --git a/University/UniversityDataModels/Models/IStatementModel.cs b/University/UniversityDataModels/Models/IStatementModel.cs index 681f016..6188a75 100644 --- a/University/UniversityDataModels/Models/IStatementModel.cs +++ b/University/UniversityDataModels/Models/IStatementModel.cs @@ -4,5 +4,6 @@ { DateTime Date { get; } int HoursCount { get; } + Dictionary Students { get; } } } diff --git a/University/UniversityDataModels/Models/IStudentModel.cs b/University/UniversityDataModels/Models/IStudentModel.cs index 2ee8691..ce5db79 100644 --- a/University/UniversityDataModels/Models/IStudentModel.cs +++ b/University/UniversityDataModels/Models/IStudentModel.cs @@ -4,5 +4,6 @@ { String Name { get; } String RecordCardNumber { get; } + Dictionary Results { get; } } }