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); }
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; }
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(); }
public SemesterRepository(ExamRegContext examReg, ICurrentContext CurrentContext) { this.examRegContext = examReg; this.CurrentContext = CurrentContext; }
public ExamRoomRepository(ExamRegContext examReg, ICurrentContext CurrentContext) { this.examRegContext = examReg; this.CurrentContext = CurrentContext; }
public ExamPeriodInit(ExamRegContext examRegContext) : base(examRegContext) { ExamPeriodCodes = new List <string>(); }
public StudentInit(ExamRegContext examRegContext) : base(examRegContext) { StudentCodes = new List <string>(); }
public ExamRegisterRepository(ExamRegContext examRegContext, ICurrentContext currentContext) { this.examRegContext = examRegContext; this.currentContext = currentContext; }
public CommonInit(ExamRegContext examRegContext) { this.examRegContext = examRegContext; }
public SemesterInit(ExamRegContext examRegContext) : base(examRegContext) { SemesterCodes = new List <string>(); }
public TermInit(ExamRegContext examRegContext) : base(examRegContext) { TermCodes = new List <string>(); }
public UserRepository(ExamRegContext examRegContext) { this.examRegContext = examRegContext; }
public ExamRoomInit(ExamRegContext examRegContext) : base(examRegContext) { ExamRoomCodes = new List <string>(); }
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; }
public UserInit(ExamRegContext examRegContext) : base(examRegContext) { UserCodes = new List <string>(); }
public ExamProgramRepository(ExamRegContext examReg, ICurrentContext currentContext) { this.examRegContext = examReg; this.CurrentContext = currentContext; }