public CreateStudentHandler(
     ISchoolContext context,
     IMapper mapper
     )
 {
     _context = context;
     _mapper  = mapper;
 }
 public StudentQueries(
     ISchoolContext context,
     IMapper mapper
     )
 {
     _context = context;
     _mapper  = mapper;
 }
 public ClassroomQueries(
     ISchoolContext context,
     IMapper mapper
     )
 {
     _context = context;
     _mapper  = mapper;
 }
 public UpdateClassHandler(
     ISchoolContext context,
     IMapper mapper
     )
 {
     _context = context;
     _mapper  = mapper;
 }
 public CreateClassroomHandler(
     ISchoolContext context,
     IMapper mapper
     )
 {
     _context = context;
     _mapper  = mapper;
 }
 public CreateTeacherHandler(
     ISchoolContext context,
     IMapper mapper
     )
 {
     _context = context;
     _mapper  = mapper;
 }
Beispiel #7
0
 public TeacherQueries(
     ISchoolContext context,
     IMapper mapper
     )
 {
     _context = context;
     _mapper  = mapper;
 }
        public SchoolQuery(ISchoolContext schoolContext)
        {
            Field <ListGraphType <PupilType> >(
                Pupils,
                $"How to query {Pupils}.",
                new QueryArguments(),
                context => schoolContext.Pupils.ToList());

            Field <ListGraphType <ClassType> >(
                Classes,
                $"How to query {Classes}.",
                new QueryArguments(),
                context => schoolContext.Classes.ToList());
        }
        public ClassType(IDataLoaderContextAccessor accessor, ISchoolContext schoolContext)
        {
            Field(_ => _.Id, type: typeof(IdGraphType))
            .Description("The class' ID.");

            Field(_ => _.Subject)
            .Description("The class' subject.");

            Field(_ => _.Pupils, type: typeof(ListGraphType <PupilType>))
            .Description("The class' pupils.")
            .ResolveAsync(
                async context =>
            {
                var pupils = await accessor.EntityCollectionLoader(
                    () => schoolContext.ClassPupil.Include(q => q.Pupil),
                    q => q.ClassId,
                    q => q,
                    q => q.ClassId,
                    context.Source.Id);

                return(pupils.Select(q => q.Pupil));
            });
        }
 public GradebookModelTests(ITestOutputHelper output)
 {
     _output = output;
     _fakeDb = new FakeSchoolContext();
 }
Beispiel #11
0
 public UpdateDepartmentCommandHandler(ISchoolContext context)
 {
     _context = context;
 }
 public DeleteTeacherHandler(ISchoolContext context)
 {
     this._context = context;
 }
 public CourseController(ISchoolContext db)
 {
     _db = db;
 }
Beispiel #14
0
 public GetUpdateInstructorCommandHandler(ISchoolContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Beispiel #15
0
 public GetCourseListCommandHandler(ISchoolContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public GradebookController(ISchoolContext db)
 {
     _db = db;
 }
 public CreateStudentCommandHandler(ISchoolContext context)
 {
     _context = context;
 }
 public StudentsController(ISchoolContext context)
 {
     this._context = context;
 }
 public StudentController(ISchoolContext db, IOptions<AppSettings> settings)
 {
     _db = db;
     _settings = settings;
 }
 public InstructorController(ISchoolContext db)
 {
     _db = db;
 }
 public SchoolInitializer(ISchoolContext context)
 {
     _context = context;
 }
 public HomeController(ISchoolContext db)
 {
     _db = db;
 }
 public CreateInstructorCommandHandler(ISchoolContext context)
 {
     _context = context;
 }
 public GetStudentsForCourseQueryHandler(ISchoolContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public GetDeleteCourseConfirmationCommandHandler(ISchoolContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Beispiel #26
0
 public StudentRepository(ISchoolContext context)
 {
     _context = context;
 }
 public GetInstructorDetailsQueryHandler(ISchoolContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Beispiel #28
0
 public GetAboutInfoQueryHandler(ISchoolContext context)
 {
     _context = context;
 }
 public GetDepartmentsOverviewQueryHandler(ISchoolContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Beispiel #30
0
 public GetCourseDetailsQueryHandler(ISchoolContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public UnitOfWork(ISchoolContext context)
 {
     _context = context;
 }
 public GetCoursesOverviewQueryHandler(ISchoolContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public InstructorControllerTests(ITestOutputHelper output)
 {
     _output = output;
     _fakeDb = new FakeSchoolContext();
 }
 public DepartmentController(ISchoolContext db)
 {
     _db = db;
 }
 public EnrollmentsController(ISchoolContext context)
 {
     _context = context;
 }
Beispiel #36
0
 public CoursesController(ISchoolContext context, ICourseBusiness courseBusiness, IMapper mapper)
 {
     _context        = context;
     _courseBusiness = courseBusiness;
     _mapper         = mapper;
 }