Esempio n. 1
0
        public EFStudentRepositoryTests()
        {
            var options = new DbContextOptionsBuilder <CodeGymContext>()
                          .UseInMemoryDatabase("InMemory" + counter++)
                          .Options;

            ctx = new CodeGymContext(options);
            studentRepository = new EFStudentRepository(ctx);
            courses           = new Course[2];
            courseEditions    = new CourseEdition[3];
            CreateEnrollmentsForBestStudentsTest();
        }
 public EFCourseRepository(CodeGymContext ctx)
 {
     this.ctx = ctx;
 }
Esempio n. 3
0
 public EFCourseEditionUnitOfWork(CourseRepository courses, CourseEditionRepository courseEditions, CodeGymContext ctx)
 {
     this.Courses        = courses;
     this.CourseEditions = courseEditions;
     this.ctx            = ctx;
 }
 public EFEnrollmentRepository(CodeGymContext ctx)
 {
     this.ctx = ctx;
 }
 public EFStudentRepository(CodeGymContext ctx)
 {
     this.ctx = ctx;
 }