| | 1 | | using Syki.Back.Configs; |
| | 2 | | using Syki.Daemon.Emails; |
| | 3 | | using Syki.Back.Features.Cross.CreateUser; |
| | 4 | | using Syki.Back.Features.Cross.ResetPassword; |
| | 5 | | using Syki.Back.Features.Academic.CreateClass; |
| | 6 | | using Syki.Back.Features.Academic.StartClasses; |
| | 7 | | using Syki.Back.Features.Academic.CreateTeacher; |
| | 8 | | using Syki.Back.Features.Academic.CreateStudent; |
| | 9 | | using Syki.Back.Features.Cross.SendResetPasswordToken; |
| | 10 | | using Syki.Back.Features.Student.CreateStudentEnrollment; |
| | 11 | | using Syki.Back.Features.Academic.CreateEnrollmentPeriod; |
| | 12 | | using Microsoft.Extensions.DependencyInjection.Extensions; |
| | 13 | | using Syki.Back.Features.Academic.ReleaseClassesForEnrollment; |
| | 14 | | using Syki.Back.Features.Academic.UpdateEnrollmentPeriod; |
| | 15 | | using Syki.Back.Features.Teacher.CreateLessonAttendance; |
| | 16 | | using Syki.Back.Features.Teacher.AddExamGradeNote; |
| | 17 | | using Syki.Back.Features.Academic.FinalizeClasses; |
| | 18 | |
|
| | 19 | | namespace Syki.Daemon.Configs; |
| | 20 | |
|
| | 21 | | public static class ServicesConfigs |
| | 22 | | { |
| | 23 | | public static void AddServicesConfigs(this IServiceCollection services) |
| | 24 | | { |
| 1 | 25 | | services.AddEfCoreConfigs(); |
| | 26 | |
|
| 1 | 27 | | services.AddScoped<CreateUserService>(); |
| 1 | 28 | | services.AddScoped<CreateTeacherService>(); |
| 1 | 29 | | services.AddScoped<CreateStudentService>(); |
| 1 | 30 | | services.AddScoped<ResetPasswordService>(); |
| 1 | 31 | | services.AddScoped<CreateClassService>(); |
| 1 | 32 | | services.AddScoped<CreateEnrollmentPeriodService>(); |
| 1 | 33 | | services.AddScoped<CreateStudentEnrollmentService>(); |
| 1 | 34 | | services.AddScoped<SendResetPasswordTokenService>(); |
| 1 | 35 | | services.AddScoped<ReleaseClassesForEnrollmentService>(); |
| 1 | 36 | | services.AddScoped<StartClassesService>(); |
| 1 | 37 | | services.AddScoped<UpdateEnrollmentPeriodService>(); |
| 1 | 38 | | services.AddScoped<CreateLessonAttendanceService>(); |
| 1 | 39 | | services.AddScoped<AddExamGradeNoteService>(); |
| 1 | 40 | | services.AddScoped<FinalizeClassesService>(); |
| | 41 | |
|
| 1 | 42 | | services.AddScoped<IEmailsService, EmailsService>(); |
| 1 | 43 | | if (Env.IsDevelopment() || Env.IsTesting()) |
| | 44 | | { |
| 1 | 45 | | services.Replace(ServiceDescriptor.Scoped<IEmailsService, FakeEmailsService>()); |
| | 46 | | } |
| | 47 | |
|
| 1 | 48 | | services.AddIdentityConfigs(); |
| 1 | 49 | | services.AddSykiTasksConfigs(); |
| 1 | 50 | | } |
| | 51 | | } |