Ejemplo n.º 1
0
        public async Task <IActionResult> Update(int idCurriculum, int id, EducacionBasicModel educacionModel)
        {
            var command = _mapper.Map(educacionModel, new ActualizarEducacionCommand()
            {
                IdCurriculum = idCurriculum, Id = id
            });
            await _mediator.Send(command);

            return(NoContent());
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <int> > Create(int idCurriculum, EducacionBasicModel educacionModel)
        {
            var command = _mapper.Map(educacionModel, new CrearEducacionCommand()
            {
                IdCurriculum = idCurriculum
            });
            var result = await _mediator.Send(command);

            return(CreatedAtAction(nameof(GetById), new { idCurriculum, id = result }, result));
        }