From 01b2bc996001b77c3cc7ca729253ca07b3e2bc69 Mon Sep 17 00:00:00 2001 From: GokaPek Date: Mon, 13 May 2024 16:21:24 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D1=82=D1=80=D0=B0=D0=BA?= =?UTF-8?q?=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/DirectionBindingModel.cs | 25 +++++++++++++++++++ .../BindingModels/ExamBindingModel.cs | 19 ++++++++++++++ .../BindingModels/ResultBindingModel.cs | 18 +++++++++++++ .../BindingModels/StudentBindingModel.cs | 16 ++++++++++++ .../BindingModels/SubjectBindingModel.cs | 15 +++++++++++ .../IDirectionLogic.cs | 24 ++++++++++++++++++ .../BusinessLogicsContracts/IExamLogic.cs | 24 ++++++++++++++++++ .../BusinessLogicsContracts/IResultLogic.cs | 24 ++++++++++++++++++ .../BusinessLogicsContracts/IStudentLogic.cs | 24 ++++++++++++++++++ .../BusinessLogicsContracts/ISubjectLogic.cs | 24 ++++++++++++++++++ .../SearchModels/DirectionSearchModel.cs | 13 ++++++++++ .../SearchModels/ExamSearchModel.cs | 13 ++++++++++ .../SearchModels/ResultSearchModel.cs | 13 ++++++++++ .../SearchModels/StudentSearchModel.cs | 13 ++++++++++ .../SearchModels/SubjectSearchModel.cs | 13 ++++++++++ .../StoragesContracts/IDirectionStorage.cs | 21 ++++++++++++++++ .../StoragesContracts/IExamStorage.cs | 21 ++++++++++++++++ .../StoragesContracts/IResultStorage.cs | 21 ++++++++++++++++ .../StoragesContracts/IStudentStorage.cs | 21 ++++++++++++++++ .../StoragesContracts/ISubjectStorage.cs | 21 ++++++++++++++++ .../ViewModels/DirectionViewModel.cs | 25 +++++++++++++++++++ .../ViewModels/ExamViewModel.cs | 19 ++++++++++++++ .../ViewModels/ResultViewModel.cs | 18 +++++++++++++ .../ViewModels/StudentViewModel.cs | 16 ++++++++++++ .../ViewModels/SubjectViewModel.cs | 15 +++++++++++ .../Models/IDirectionModel.cs | 2 +- TaskTrackerDataModels/Models/IExamModel.cs | 2 +- TaskTrackerDataModels/Models/IResultModel.cs | 2 +- TaskTrackerDataModels/Models/IStudentModel.cs | 2 +- TaskTrackerDataModels/Models/ISubjectModel.cs | 2 +- 30 files changed, 481 insertions(+), 5 deletions(-) create mode 100644 TaskTrackerContracts/BindingModels/DirectionBindingModel.cs create mode 100644 TaskTrackerContracts/BindingModels/ExamBindingModel.cs create mode 100644 TaskTrackerContracts/BindingModels/ResultBindingModel.cs create mode 100644 TaskTrackerContracts/BindingModels/StudentBindingModel.cs create mode 100644 TaskTrackerContracts/BindingModels/SubjectBindingModel.cs create mode 100644 TaskTrackerContracts/BusinessLogicsContracts/IDirectionLogic.cs create mode 100644 TaskTrackerContracts/BusinessLogicsContracts/IExamLogic.cs create mode 100644 TaskTrackerContracts/BusinessLogicsContracts/IResultLogic.cs create mode 100644 TaskTrackerContracts/BusinessLogicsContracts/IStudentLogic.cs create mode 100644 TaskTrackerContracts/BusinessLogicsContracts/ISubjectLogic.cs create mode 100644 TaskTrackerContracts/SearchModels/DirectionSearchModel.cs create mode 100644 TaskTrackerContracts/SearchModels/ExamSearchModel.cs create mode 100644 TaskTrackerContracts/SearchModels/ResultSearchModel.cs create mode 100644 TaskTrackerContracts/SearchModels/StudentSearchModel.cs create mode 100644 TaskTrackerContracts/SearchModels/SubjectSearchModel.cs create mode 100644 TaskTrackerContracts/StoragesContracts/IDirectionStorage.cs create mode 100644 TaskTrackerContracts/StoragesContracts/IExamStorage.cs create mode 100644 TaskTrackerContracts/StoragesContracts/IResultStorage.cs create mode 100644 TaskTrackerContracts/StoragesContracts/IStudentStorage.cs create mode 100644 TaskTrackerContracts/StoragesContracts/ISubjectStorage.cs create mode 100644 TaskTrackerContracts/ViewModels/DirectionViewModel.cs create mode 100644 TaskTrackerContracts/ViewModels/ExamViewModel.cs create mode 100644 TaskTrackerContracts/ViewModels/ResultViewModel.cs create mode 100644 TaskTrackerContracts/ViewModels/StudentViewModel.cs create mode 100644 TaskTrackerContracts/ViewModels/SubjectViewModel.cs diff --git a/TaskTrackerContracts/BindingModels/DirectionBindingModel.cs b/TaskTrackerContracts/BindingModels/DirectionBindingModel.cs new file mode 100644 index 0000000..3667020 --- /dev/null +++ b/TaskTrackerContracts/BindingModels/DirectionBindingModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.BindingModels +{ + public class DirectionBindingModel : IDirectionModel + { + public int Id { get; set; } + public Dictionary DirectionStudents + { + get; + set; + } = new(); + + public Dictionary DirectionSubjects + { + get; + set; + } = new(); + } +} diff --git a/TaskTrackerContracts/BindingModels/ExamBindingModel.cs b/TaskTrackerContracts/BindingModels/ExamBindingModel.cs new file mode 100644 index 0000000..bfa854f --- /dev/null +++ b/TaskTrackerContracts/BindingModels/ExamBindingModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.BindingModels +{ + public class ExamBindingModel : IExamModel + { + public int Id { get; set; } + public int SubjectId { get; set; } + + public DateTime Date { get; set; } + + + } +} diff --git a/TaskTrackerContracts/BindingModels/ResultBindingModel.cs b/TaskTrackerContracts/BindingModels/ResultBindingModel.cs new file mode 100644 index 0000000..cda2066 --- /dev/null +++ b/TaskTrackerContracts/BindingModels/ResultBindingModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.BindingModels +{ + public class ResultBindingModel : IResultModel + { + public int Id { get; set; } + public int StudentId { get; set; } + + public int SubjectId { get; set; } + public string Grade { get; set; } = string.Empty; + } +} diff --git a/TaskTrackerContracts/BindingModels/StudentBindingModel.cs b/TaskTrackerContracts/BindingModels/StudentBindingModel.cs new file mode 100644 index 0000000..77d0835 --- /dev/null +++ b/TaskTrackerContracts/BindingModels/StudentBindingModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.BindingModels +{ + public class StudentBindingModel : IStudentModel + { + public int Id { get; set; } + public DateTime DateBirth { get; set; } + public string Name { get; set; } = string.Empty; + }; +} diff --git a/TaskTrackerContracts/BindingModels/SubjectBindingModel.cs b/TaskTrackerContracts/BindingModels/SubjectBindingModel.cs new file mode 100644 index 0000000..3352fe3 --- /dev/null +++ b/TaskTrackerContracts/BindingModels/SubjectBindingModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.BindingModels +{ + public class SubjectBindingModel : ISubjectModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + } +} diff --git a/TaskTrackerContracts/BusinessLogicsContracts/IDirectionLogic.cs b/TaskTrackerContracts/BusinessLogicsContracts/IDirectionLogic.cs new file mode 100644 index 0000000..9f01fe7 --- /dev/null +++ b/TaskTrackerContracts/BusinessLogicsContracts/IDirectionLogic.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.BusinessLogicsContracts +{ + public interface IDirectionLogic + { + List? ReadList(DirectionSearchModel? model); + + DirectionViewModel? ReadElement(DirectionSearchModel model); + + bool Create(DirectionBindingModel model); + + bool Update(DirectionBindingModel model); + + bool Delete(DirectionBindingModel model); + } +} diff --git a/TaskTrackerContracts/BusinessLogicsContracts/IExamLogic.cs b/TaskTrackerContracts/BusinessLogicsContracts/IExamLogic.cs new file mode 100644 index 0000000..ebaa1d9 --- /dev/null +++ b/TaskTrackerContracts/BusinessLogicsContracts/IExamLogic.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.BusinessLogicsContracts +{ + public interface IExamLogic + { + List? ReadList(ExamSearchModel? model); + + ExamViewModel? ReadElement(ExamSearchModel model); + + bool Create(ExamBindingModel model); + + bool Update(ExamBindingModel model); + + bool Delete(ExamBindingModel model); + } +} diff --git a/TaskTrackerContracts/BusinessLogicsContracts/IResultLogic.cs b/TaskTrackerContracts/BusinessLogicsContracts/IResultLogic.cs new file mode 100644 index 0000000..5b7b779 --- /dev/null +++ b/TaskTrackerContracts/BusinessLogicsContracts/IResultLogic.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.BusinessLogicsContracts +{ + public interface IResultLogic + { + List? ReadList(ResultSearchModel? model); + + ResultViewModel? ReadElement(ResultSearchModel model); + + bool Create(ResultBindingModel model); + + bool Update(ResultBindingModel model); + + bool Delete(ResultBindingModel model); + } +} diff --git a/TaskTrackerContracts/BusinessLogicsContracts/IStudentLogic.cs b/TaskTrackerContracts/BusinessLogicsContracts/IStudentLogic.cs new file mode 100644 index 0000000..1c4fa8c --- /dev/null +++ b/TaskTrackerContracts/BusinessLogicsContracts/IStudentLogic.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.BusinessLogicsContracts +{ + public interface IStudentLogic + { + List? ReadList(StudentSearchModel? model); + + StudentViewModel? ReadElement(StudentSearchModel model); + + bool Create(StudentBindingModel model); + + bool Update(StudentBindingModel model); + + bool Delete(StudentBindingModel model); + } +} diff --git a/TaskTrackerContracts/BusinessLogicsContracts/ISubjectLogic.cs b/TaskTrackerContracts/BusinessLogicsContracts/ISubjectLogic.cs new file mode 100644 index 0000000..0e8e400 --- /dev/null +++ b/TaskTrackerContracts/BusinessLogicsContracts/ISubjectLogic.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.BusinessLogicsContracts +{ + public interface ISubjectLogic + { + List? ReadList(SubjectSearchModel? model); + + SubjectViewModel? ReadElement(SubjectSearchModel model); + + bool Create(SubjectBindingModel model); + + bool Update(SubjectBindingModel model); + + bool Delete(SubjectBindingModel model); + } +} diff --git a/TaskTrackerContracts/SearchModels/DirectionSearchModel.cs b/TaskTrackerContracts/SearchModels/DirectionSearchModel.cs new file mode 100644 index 0000000..6039243 --- /dev/null +++ b/TaskTrackerContracts/SearchModels/DirectionSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TaskTrackerContracts.SearchModels +{ + public class DirectionSearchModel + { + public int? Id { get; set; } + } +} diff --git a/TaskTrackerContracts/SearchModels/ExamSearchModel.cs b/TaskTrackerContracts/SearchModels/ExamSearchModel.cs new file mode 100644 index 0000000..36eeab3 --- /dev/null +++ b/TaskTrackerContracts/SearchModels/ExamSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TaskTrackerContracts.SearchModels +{ + public class ExamSearchModel + { + public int? Id { get; set; } + } +} diff --git a/TaskTrackerContracts/SearchModels/ResultSearchModel.cs b/TaskTrackerContracts/SearchModels/ResultSearchModel.cs new file mode 100644 index 0000000..c22d947 --- /dev/null +++ b/TaskTrackerContracts/SearchModels/ResultSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TaskTrackerContracts.SearchModels +{ + public class ResultSearchModel + { + public int? Id { get; set; } + } +} diff --git a/TaskTrackerContracts/SearchModels/StudentSearchModel.cs b/TaskTrackerContracts/SearchModels/StudentSearchModel.cs new file mode 100644 index 0000000..e966053 --- /dev/null +++ b/TaskTrackerContracts/SearchModels/StudentSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TaskTrackerContracts.SearchModels +{ + public class StudentSearchModel + { + public int? Id { get; set; } + } +} diff --git a/TaskTrackerContracts/SearchModels/SubjectSearchModel.cs b/TaskTrackerContracts/SearchModels/SubjectSearchModel.cs new file mode 100644 index 0000000..8b3b514 --- /dev/null +++ b/TaskTrackerContracts/SearchModels/SubjectSearchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TaskTrackerContracts.SearchModels +{ + public class SubjectSearchModel + { + public int? Id { get; set; } + } +} diff --git a/TaskTrackerContracts/StoragesContracts/IDirectionStorage.cs b/TaskTrackerContracts/StoragesContracts/IDirectionStorage.cs new file mode 100644 index 0000000..9b5fcb9 --- /dev/null +++ b/TaskTrackerContracts/StoragesContracts/IDirectionStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.StoragesContracts +{ + public interface IDirectionStorage + { + List GetFullList(); + List GetFilteredList(DirectionSearchModel model); + DirectionBindingModel? GetElement(DirectionSearchModel model); + DirectionBindingModel? Insert(DirectionBindingModel model); + DirectionBindingModel? Update(DirectionBindingModel model); + DirectionBindingModel? Delete(DirectionBindingModel model); + } +} diff --git a/TaskTrackerContracts/StoragesContracts/IExamStorage.cs b/TaskTrackerContracts/StoragesContracts/IExamStorage.cs new file mode 100644 index 0000000..a2359cf --- /dev/null +++ b/TaskTrackerContracts/StoragesContracts/IExamStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.StoragesContracts +{ + public interface IExamStorage + { + List GetFullList(); + List GetFilteredList(ExamSearchModel model); + ExamBindingModel? GetElement(ExamSearchModel model); + ExamBindingModel? Insert(ExamBindingModel model); + ExamBindingModel? Update(ExamBindingModel model); + ExamBindingModel? Delete(ExamBindingModel model); + } +} diff --git a/TaskTrackerContracts/StoragesContracts/IResultStorage.cs b/TaskTrackerContracts/StoragesContracts/IResultStorage.cs new file mode 100644 index 0000000..90a07ab --- /dev/null +++ b/TaskTrackerContracts/StoragesContracts/IResultStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.StoragesContracts +{ + public interface IResultStorage + { + List GetFullList(); + List GetFilteredList(ResultSearchModel model); + ResultBindingModel? GetElement(ResultSearchModel model); + ResultBindingModel? Insert(ResultBindingModel model); + ResultBindingModel? Update(ResultBindingModel model); + ResultBindingModel? Delete(ResultBindingModel model); + } +} diff --git a/TaskTrackerContracts/StoragesContracts/IStudentStorage.cs b/TaskTrackerContracts/StoragesContracts/IStudentStorage.cs new file mode 100644 index 0000000..74998e7 --- /dev/null +++ b/TaskTrackerContracts/StoragesContracts/IStudentStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.StoragesContracts +{ + public interface IStudentStorage + { + List GetFullList(); + List GetFilteredList(StudentSearchModel model); + StudentBindingModel? GetElement(StudentSearchModel model); + StudentBindingModel? Insert(StudentBindingModel model); + StudentBindingModel? Update(StudentBindingModel model); + StudentBindingModel? Delete(StudentBindingModel model); + } +} diff --git a/TaskTrackerContracts/StoragesContracts/ISubjectStorage.cs b/TaskTrackerContracts/StoragesContracts/ISubjectStorage.cs new file mode 100644 index 0000000..a60efad --- /dev/null +++ b/TaskTrackerContracts/StoragesContracts/ISubjectStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerContracts.BindingModels; +using TaskTrackerContracts.SearchModels; +using TaskTrackerContracts.ViewModels; + +namespace TaskTrackerContracts.StoragesContracts +{ + public interface ISubjectStorage + { + List GetFullList(); + List GetFilteredList(SubjectSearchModel model); + SubjectBindingModel? GetElement(SubjectSearchModel model); + SubjectBindingModel? Insert(SubjectBindingModel model); + SubjectBindingModel? Update(SubjectBindingModel model); + SubjectBindingModel? Delete(SubjectBindingModel model); + } +} diff --git a/TaskTrackerContracts/ViewModels/DirectionViewModel.cs b/TaskTrackerContracts/ViewModels/DirectionViewModel.cs new file mode 100644 index 0000000..fd0e43b --- /dev/null +++ b/TaskTrackerContracts/ViewModels/DirectionViewModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.ViewModels +{ + public class DirectionViewModel : IDirectionModel + { + public int Id { get; set; } + public Dictionary DirectionStudents + { + get; + set; + } = new(); + + public Dictionary DirectionSubjects + { + get; + set; + } = new(); + } +} diff --git a/TaskTrackerContracts/ViewModels/ExamViewModel.cs b/TaskTrackerContracts/ViewModels/ExamViewModel.cs new file mode 100644 index 0000000..f8980a3 --- /dev/null +++ b/TaskTrackerContracts/ViewModels/ExamViewModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.ViewModels +{ + public class ExamViewModel : IExamModel + { + public int Id { get; set; } + public int SubjectId { get; set; } + + public DateTime Date { get; set; } + + + } +} diff --git a/TaskTrackerContracts/ViewModels/ResultViewModel.cs b/TaskTrackerContracts/ViewModels/ResultViewModel.cs new file mode 100644 index 0000000..e62753f --- /dev/null +++ b/TaskTrackerContracts/ViewModels/ResultViewModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.ViewModels +{ + public class ResultViewModel : IResultModel + { + public int Id { get; set; } + public int StudentId { get; set; } + + public int SubjectId { get; set; } + public string Grade { get; set; } = string.Empty; + } +} diff --git a/TaskTrackerContracts/ViewModels/StudentViewModel.cs b/TaskTrackerContracts/ViewModels/StudentViewModel.cs new file mode 100644 index 0000000..0be9a46 --- /dev/null +++ b/TaskTrackerContracts/ViewModels/StudentViewModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.ViewModels +{ + public class StudentViewModel : IStudentModel + { + public int Id { get; set; } + public DateTime DateBirth { get; set; } + public string Name { get; set; } = string.Empty; + }; +} diff --git a/TaskTrackerContracts/ViewModels/SubjectViewModel.cs b/TaskTrackerContracts/ViewModels/SubjectViewModel.cs new file mode 100644 index 0000000..cff2c3b --- /dev/null +++ b/TaskTrackerContracts/ViewModels/SubjectViewModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TaskTrackerDataModels.Models; + +namespace TaskTrackerContracts.ViewModels +{ + public class SubjectViewModel : ISubjectModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + } +} diff --git a/TaskTrackerDataModels/Models/IDirectionModel.cs b/TaskTrackerDataModels/Models/IDirectionModel.cs index ae7d7ff..9e447d7 100644 --- a/TaskTrackerDataModels/Models/IDirectionModel.cs +++ b/TaskTrackerDataModels/Models/IDirectionModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace TaskTrackerDataModels.Models { - internal interface IDirectionModel : IId + public interface IDirectionModel : IId { Dictionary DirectionStudents { get; } Dictionary DirectionSubjects { get; } diff --git a/TaskTrackerDataModels/Models/IExamModel.cs b/TaskTrackerDataModels/Models/IExamModel.cs index a0687fb..13d0648 100644 --- a/TaskTrackerDataModels/Models/IExamModel.cs +++ b/TaskTrackerDataModels/Models/IExamModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace TaskTrackerDataModels.Models { - internal interface IExamModel : IId + public interface IExamModel : IId { int SubjectId { get; } DateTime Date { get; } diff --git a/TaskTrackerDataModels/Models/IResultModel.cs b/TaskTrackerDataModels/Models/IResultModel.cs index f3e2e0b..3b244ce 100644 --- a/TaskTrackerDataModels/Models/IResultModel.cs +++ b/TaskTrackerDataModels/Models/IResultModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace TaskTrackerDataModels.Models { - internal interface IResultModel : IId + public interface IResultModel : IId { string Grade { get; } int StudentId { get; } diff --git a/TaskTrackerDataModels/Models/IStudentModel.cs b/TaskTrackerDataModels/Models/IStudentModel.cs index f6a5de7..8ff15ed 100644 --- a/TaskTrackerDataModels/Models/IStudentModel.cs +++ b/TaskTrackerDataModels/Models/IStudentModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace TaskTrackerDataModels.Models { - internal interface IStudentModel : IId + public interface IStudentModel : IId { string Name { get; } DateTime DateBirth { get; } diff --git a/TaskTrackerDataModels/Models/ISubjectModel.cs b/TaskTrackerDataModels/Models/ISubjectModel.cs index 8697c6b..4aded8c 100644 --- a/TaskTrackerDataModels/Models/ISubjectModel.cs +++ b/TaskTrackerDataModels/Models/ISubjectModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace TaskTrackerDataModels.Models { - internal interface ISubjectModel : IId + public interface ISubjectModel : IId { string Name { get; } }