diff --git a/StudentProgressRecord/Entity/Teacher.cs b/StudentProgressRecord/Entity/Teacher.cs index 2ceea3d..0178753 100644 --- a/StudentProgressRecord/Entity/Teacher.cs +++ b/StudentProgressRecord/Entity/Teacher.cs @@ -14,13 +14,13 @@ namespace StudentProgressRecord.Entity public long DepartmentID { get; set; } - public static Teacher CreateTeacher(long id, string Fio, long DepartmentID) + public static Teacher CreateTeacher(long id, string Fio, long departmentId) { return new Teacher { Id = id, Fio = Fio, - DepartmentID = DepartmentID + DepartmentID = departmentId }; } diff --git a/StudentProgressRecord/Repositories/IDepartmentRepository.cs b/StudentProgressRecord/Repositories/IDepartmentRepository.cs new file mode 100644 index 0000000..434fb6d --- /dev/null +++ b/StudentProgressRecord/Repositories/IDepartmentRepository.cs @@ -0,0 +1,20 @@ +using StudentProgressRecord.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StudentProgressRecord.Repositories +{ + public interface IDepartmentRepository + { + + IEnumerable ReadDepartments(long? facultyId=null); + Department ReadDepartmentById(long id); + void CreateDepartment(Department department); + void UpdateDepartment(Department department); + void DeleteDepartment(long id); + + } +} diff --git a/StudentProgressRecord/Repositories/IFacultyRepository.cs b/StudentProgressRecord/Repositories/IFacultyRepository.cs new file mode 100644 index 0000000..1b1603e --- /dev/null +++ b/StudentProgressRecord/Repositories/IFacultyRepository.cs @@ -0,0 +1,19 @@ +using StudentProgressRecord.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StudentProgressRecord.Repositories +{ + public interface IFacultyRepository + { + IEnumerable ReadFaculties(); + Faculty ReadFacultyById(long id); + void CreateFaculty(Faculty faculty); + void UpdateFaculty(Faculty faculty); + void DeleteFaculty(long id); + + } +} diff --git a/StudentProgressRecord/Repositories/IGroupRepository.cs b/StudentProgressRecord/Repositories/IGroupRepository.cs new file mode 100644 index 0000000..03213d4 --- /dev/null +++ b/StudentProgressRecord/Repositories/IGroupRepository.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace StudentProgressRecord.Repositories +{ + public interface IGroupRepository + { + IEnumerable ReadGroups(long? departmentId=null); + Group ReadGroupById(long id); + void CreateGroup(Group group); + void UpdateGroup(Group group); + void DeleteGroup(long id); + } +} diff --git a/StudentProgressRecord/Repositories/IStatementReposytory.cs b/StudentProgressRecord/Repositories/IStatementReposytory.cs new file mode 100644 index 0000000..4e561bc --- /dev/null +++ b/StudentProgressRecord/Repositories/IStatementReposytory.cs @@ -0,0 +1,13 @@ +using StudentProgressRecord.Entity; + +namespace StudentProgressRecord.Repositories +{ + public interface IStatementReposytory + { + IEnumerable ReadStatements(long? subjectId, long? teacherId, long? studentId, DateTime? dateTo=null, int? mark=null); + Statement ReadStatementById(long id); + void CreateStatement(Statement statement); + void UpdateStatement(Statement statement); + void DeleteStatement(long id); + } +} diff --git a/StudentProgressRecord/Repositories/IStudentRepository.cs b/StudentProgressRecord/Repositories/IStudentRepository.cs new file mode 100644 index 0000000..9197538 --- /dev/null +++ b/StudentProgressRecord/Repositories/IStudentRepository.cs @@ -0,0 +1,18 @@ +using StudentProgressRecord.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StudentProgressRecord.Repositories +{ + public interface IStudentRepository + { + IEnumerable ReadStudents(long? groupId = null, bool? familyPos=null, bool? domitory=null); + Student ReadStudentById(long id); + void CreateStudent(Student student); + void UpdateStudent(Student student); + void DeleteStudent(long id); + } +} diff --git a/StudentProgressRecord/Repositories/ISubjectRepository.cs b/StudentProgressRecord/Repositories/ISubjectRepository.cs new file mode 100644 index 0000000..a5e3dec --- /dev/null +++ b/StudentProgressRecord/Repositories/ISubjectRepository.cs @@ -0,0 +1,18 @@ +using StudentProgressRecord.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StudentProgressRecord.Repositories +{ + public interface ISubjectRepository + { + IEnumerable ReadSubjects(); + Subject ReadSubjectById(long id); + void CreateSubject(Subject subject); + void UpdateSubject(Subject subject); + void DeleteSubject(long id); + } +} diff --git a/StudentProgressRecord/Repositories/ITeacherRepository.cs b/StudentProgressRecord/Repositories/ITeacherRepository.cs new file mode 100644 index 0000000..f88c92f --- /dev/null +++ b/StudentProgressRecord/Repositories/ITeacherRepository.cs @@ -0,0 +1,19 @@ +using StudentProgressRecord.Entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StudentProgressRecord.Repositories +{ + public interface ITeacherRepository + { + + IEnumerable ReadTeachers(long? departmentID = null); + Teacher ReadTeacherById(long id); + void CreateTeacher(Teacher teacher); + void UpdateTeacher(Teacher teacher); + void DeleteTeacher(long id); + } +}