public async Task <Response <IList <TeacherClassDto> > > Handle(GetAllTeacherClassesQuery request, CancellationToken cancellationToken)
        {
            var teacherClasses = await _context.TeacherClasses.AsNoTracking()
                                 .ToListAsync(cancellationToken);

            if (teacherClasses is null)
            {
                return(Response.Fail <IList <TeacherClassDto> >("An error occured while fetching data!"));
            }

            var result = _mapper.Map <List <TeacherClassDto> >(teacherClasses);

            return(Response.Success <IList <TeacherClassDto> >(result, "TeacherClass relationships are fetched successfully."));
        }
        public async Task <IActionResult> GetAll()
        {
            var query = new GetAllTeacherClassesQuery();

            return(Ok(await Mediator.Send(query)));
        }