Exemplo n.º 1
0
        public async Task<IActionResult> GetTeacherByIdAsync(int teacherId)
        {

            var query = new GetTeacherByIdQuery(teacherId);
            var result = await mediator.Send(query);
            return Ok(result);
        }
        public async Task <IActionResult> GetById([FromRoute] string teacherId)
        {
            var query = new GetTeacherByIdQuery {
                Id = teacherId
            };

            return(Ok(await Mediator.Send(query)));
        }
Exemplo n.º 3
0
 public async Task <ActionResult <TeacherDto> > GetById([FromQuery] GetTeacherByIdQuery query)
 {
     return(await Mediator.Send(query));
 }