Example #1
0
 public DataInit(ExamRegContext examRegContext)
 {
     this.examRegContext    = examRegContext;
     userInit               = new UserInit(examRegContext);
     termInit               = new TermInit(examRegContext);
     studentTermInit        = new StudentTermInit(examRegContext);
     studentInit            = new StudentInit(examRegContext);
     semesterInit           = new SemesterInit(examRegContext);
     examRoomInit           = new ExamRoomInit(examRegContext);
     examRoomExamPeriodInit = new ExamRoomExamPeriodInit(examRegContext);
     examRegisterInit       = new ExamRegisterInit(examRegContext);
     examProgramInit        = new ExamProgramInit(examRegContext);
     examPeriodInit         = new ExamPeriodInit(examRegContext);
 }
Example #2
0
 public UOW(ExamRegContext examReg, ICurrentContext CurrentContext)
 {
     this.examRegContext                   = examReg;
     this.CurrentContext                   = CurrentContext;
     UserRepository                        = new UserRepository(this.examRegContext, CurrentContext);
     ExamPeriodRepository                  = new ExamPeriodRepository(this.examRegContext, CurrentContext);
     ExamProgramRepository                 = new ExamProgramRepository(this.examRegContext, CurrentContext);
     ExamRegisterRepository                = new ExamRegisterRepository(this.examRegContext, CurrentContext);
     ExamRoomExamPeriodRepository          = new ExamRoomExamPeriodRepository(this.examRegContext, CurrentContext);
     ExamRoomRepository                    = new ExamRoomRepository(this.examRegContext, CurrentContext);
     SemesterRepository                    = new SemesterRepository(this.examRegContext, CurrentContext);
     StudentRepository                     = new StudentRepository(this.examRegContext, CurrentContext);
     StudentTermRepository                 = new StudentTermRepository(this.examRegContext, CurrentContext);
     TermRepository                        = new TermRepository(this.examRegContext, CurrentContext);
     EntityFrameworkManager.ContextFactory = DbContext => examRegContext;
 }
Example #3
0
        static void Main(string[] args)
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("appsettings.json")
                         .Build();
            string connectionString = config.GetConnectionString("ExamRegContext");
            var    options          = new DbContextOptionsBuilder <ExamRegContext>()
                                      .UseNpgsql(connectionString)
                                      .Options;

            examRegContext = new ExamRegContext(options);
            EntityFrameworkManager.ContextFactory = DbContext => examRegContext;

            DataInit dataInit = new DataInit(examRegContext);

            dataInit.Init();
        }
Example #4
0
 public SemesterRepository(ExamRegContext examReg, ICurrentContext CurrentContext)
 {
     this.examRegContext = examReg;
     this.CurrentContext = CurrentContext;
 }
 public ExamRoomRepository(ExamRegContext examReg, ICurrentContext CurrentContext)
 {
     this.examRegContext = examReg;
     this.CurrentContext = CurrentContext;
 }
Example #6
0
 public ExamPeriodInit(ExamRegContext examRegContext) : base(examRegContext)
 {
     ExamPeriodCodes = new List <string>();
 }
Example #7
0
 public StudentInit(ExamRegContext examRegContext) : base(examRegContext)
 {
     StudentCodes = new List <string>();
 }
Example #8
0
 public ExamRegisterRepository(ExamRegContext examRegContext, ICurrentContext currentContext)
 {
     this.examRegContext = examRegContext;
     this.currentContext = currentContext;
 }
Example #9
0
 public CommonInit(ExamRegContext examRegContext)
 {
     this.examRegContext = examRegContext;
 }
Example #10
0
 public SemesterInit(ExamRegContext examRegContext) : base(examRegContext)
 {
     SemesterCodes = new List <string>();
 }
Example #11
0
 public TermInit(ExamRegContext examRegContext) : base(examRegContext)
 {
     TermCodes = new List <string>();
 }
 public UserRepository(ExamRegContext examRegContext)
 {
     this.examRegContext = examRegContext;
 }
Example #13
0
 public ExamRoomInit(ExamRegContext examRegContext) : base(examRegContext)
 {
     ExamRoomCodes = new List <string>();
 }
Example #14
0
 public UOW(ExamRegContext examRegContext)
 {
     this.examRegContext = examRegContext;
     UserRepository      = new UserRepository(examRegContext);
 }
 public StudentTermRepository(ExamRegContext examRegContext, ICurrentContext CurrentContext)
 {
     this.examRegContext = examRegContext;
     this.CurrentContext = CurrentContext;
 }
 public UserRepository(ExamRegContext examRegContext, ICurrentContext CurrentContext)
 {
     this.examRegContext = examRegContext;
     this.CurrentContext = CurrentContext;
 }
Example #17
0
 public UserInit(ExamRegContext examRegContext) : base(examRegContext)
 {
     UserCodes = new List <string>();
 }
Example #18
0
 public ExamProgramRepository(ExamRegContext examReg, ICurrentContext currentContext)
 {
     this.examRegContext = examReg;
     this.CurrentContext = currentContext;
 }