Repos
This commit is contained in:
parent
7d448c781e
commit
898a3c0c7b
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
20
StudentProgressRecord/Repositories/IDepartmentRepository.cs
Normal file
20
StudentProgressRecord/Repositories/IDepartmentRepository.cs
Normal file
@ -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<Department> ReadDepartments(long? facultyId=null);
|
||||
Department ReadDepartmentById(long id);
|
||||
void CreateDepartment(Department department);
|
||||
void UpdateDepartment(Department department);
|
||||
void DeleteDepartment(long id);
|
||||
|
||||
}
|
||||
}
|
19
StudentProgressRecord/Repositories/IFacultyRepository.cs
Normal file
19
StudentProgressRecord/Repositories/IFacultyRepository.cs
Normal file
@ -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<Faculty> ReadFaculties();
|
||||
Faculty ReadFacultyById(long id);
|
||||
void CreateFaculty(Faculty faculty);
|
||||
void UpdateFaculty(Faculty faculty);
|
||||
void DeleteFaculty(long id);
|
||||
|
||||
}
|
||||
}
|
18
StudentProgressRecord/Repositories/IGroupRepository.cs
Normal file
18
StudentProgressRecord/Repositories/IGroupRepository.cs
Normal file
@ -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<Group> ReadGroups(long? departmentId=null);
|
||||
Group ReadGroupById(long id);
|
||||
void CreateGroup(Group group);
|
||||
void UpdateGroup(Group group);
|
||||
void DeleteGroup(long id);
|
||||
}
|
||||
}
|
13
StudentProgressRecord/Repositories/IStatementReposytory.cs
Normal file
13
StudentProgressRecord/Repositories/IStatementReposytory.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using StudentProgressRecord.Entity;
|
||||
|
||||
namespace StudentProgressRecord.Repositories
|
||||
{
|
||||
public interface IStatementReposytory
|
||||
{
|
||||
IEnumerable<Statement> 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);
|
||||
}
|
||||
}
|
18
StudentProgressRecord/Repositories/IStudentRepository.cs
Normal file
18
StudentProgressRecord/Repositories/IStudentRepository.cs
Normal file
@ -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<Student> 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);
|
||||
}
|
||||
}
|
18
StudentProgressRecord/Repositories/ISubjectRepository.cs
Normal file
18
StudentProgressRecord/Repositories/ISubjectRepository.cs
Normal file
@ -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<Subject> ReadSubjects();
|
||||
Subject ReadSubjectById(long id);
|
||||
void CreateSubject(Subject subject);
|
||||
void UpdateSubject(Subject subject);
|
||||
void DeleteSubject(long id);
|
||||
}
|
||||
}
|
19
StudentProgressRecord/Repositories/ITeacherRepository.cs
Normal file
19
StudentProgressRecord/Repositories/ITeacherRepository.cs
Normal file
@ -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<Teacher> ReadTeachers(long? departmentID = null);
|
||||
Teacher ReadTeacherById(long id);
|
||||
void CreateTeacher(Teacher teacher);
|
||||
void UpdateTeacher(Teacher teacher);
|
||||
void DeleteTeacher(long id);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user