Example #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env,
                              ILoggerFactory loggerFactory, ELearningDbContext db)
        {
            if (env.IsDevelopment())
            {
                app.UseCors(builder =>
                            builder
                            .WithOrigins("http://localhost:60000", "http://localhost:5001") //<-- OP's origin
                            .AllowAnyHeader()
                            .AllowAnyOrigin()
                            .AllowAnyMethod()
                            .AllowCredentials()
                            );
            }
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            //loggerFactory.AddDebug();
            loggerFactory.AddFile("Logs/ELearning_Logs_{Date}.txt");

            app.UseResponseCompression().UseStaticFiles();

            app.UseTokenMiddlewareExtensions();

            app.UseMvc();

            InitDb.Init(db);
        }
Example #2
0
 public CompileCodeCommandHandler(ELearningDbContext context, ICompilerService compiler, IFileSaveService filesave)
 {
     _context  = context;
     _compiler = compiler;
     _filesave = filesave;
     _now      = DateTime.Now;
 }
 public CreateUserCommandHandler(ELearningDbContext context)
 {
     _context = context;
     _random  = new Random();
 }
 public GetGroupSectionsListByIdQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
 public GetExerciseByIdQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #6
0
 public CoursesRepository(ELearningDbContext context, ILogger <CoursesRepository> log, IRateRepository rate)
 {
     _context = context;
     _log     = log;
     _rate    = rate;
 }
Example #7
0
 public UpdateSectionCommandHandler(ELearningDbContext context)
 {
     _context = context;
 }
 public DeleteSubjectCommandHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #9
0
 public SaveAssignmentSolutionCommandHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #10
0
 public GetAssignmentEvaluationsListByIdQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #11
0
 public GetSectionEvaluationsListByIdQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #12
0
 public GetSubjectByIdQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
 public DeleteGroupCommandHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #14
0
 public CategoryRepository(ELearningDbContext context, ILogger <CategoryRepository> log)
 {
     _context = context;
     _log     = log;
 }
Example #15
0
 public GetAssignmentsListQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #16
0
 public LenguajesController(ELearningDbContext context)
 {
     _context = context;
 }
Example #17
0
 public GetPresentAssignmentsListByIdQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #18
0
 public GetVariantsListQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #19
0
 public NotificationRepository(ELearningDbContext context)
 {
     _context = context;
 }
 public GetEvaluationByIdQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #21
0
 public ProfesoresController(ELearningDbContext context)
 {
     _context = context;
 }
Example #22
0
 public GetUserByIdQueryHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #23
0
 public ExamDetailsRepository(ELearningDbContext context, ILogger <ExamDetailsRepository> log)
 {
     _context = context;
     _log     = log;
 }
Example #24
0
 public CetificateRepository(ELearningDbContext context, ILogger <CetificateRepository> log)
 {
     _context = context;
     _log     = log;
 }
Example #25
0
 public DeleteAssignmentCommandHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #26
0
 public UpdateUserCommandHandler(ELearningDbContext context)
 {
     _context = context;
 }
 public LessonRepository(ELearningDbContext context, ILogger<LessonRepository> log)
 {
     _context = context;
     _log = log;
 }
Example #28
0
 public DeleteEvaluationCommandHandler(ELearningDbContext context)
 {
     _context = context;
 }
Example #29
0
 public CourseDetailsRepository(ELearningDbContext context, ILogger <CourseDetailsRepository> log)
 {
     _context = context;
     _log     = log;
 }
Example #30
0
 public VideosController(ELearningDbContext context)
 {
     _context = context;
 }