public async Task <int> CreatePreguntaAsync(PreguntaToCreateVM preguntaToCreateVM) { var entity = mapper.Map <PreguntaEntity>(preguntaToCreateVM); var id = await leccionRepository.CreatePreguntaAsync(entity); return(id); }
public async Task <IActionResult> CreatePreguntaAsync(int idLeccion, [FromBody] PreguntaToCreateVM preguntaToCreateVM) { preguntaToCreateVM.IdLeccion = idLeccion; var result = await leccionService.CreatePreguntaAsync(preguntaToCreateVM); return(Ok(result)); }