public async Task CreateSpeechAsync(SpeechDTO speechDTO) { var speech = _mapper.Map <SpeechDTO, Speech>(speechDTO); await _speechService.CreateAsync(speech); speechDTO.Id = speech.Id; }
public async Task <ActionResult> Update(int id, SpeechDTO speechDTO) { if (speechDTO.Id != id) { BadRequest(); } await _administrationMicroservice.UpdateSpeechAsync(id, speechDTO); return(NoContent()); }
public async Task <ActionResult <SpeechDTO> > Create(SpeechDTO speechDTO) { await _administrationMicroservice.CreateSpeechAsync(speechDTO); return(CreatedAtAction(nameof(GetById), new { id = speechDTO.Id }, speechDTO)); }
public async Task UpdateSpeechAsync(int id, SpeechDTO speechDTO) { var speech = _mapper.Map <SpeechDTO, Speech>(speechDTO); await _speechService.UpdateAsync(id, speech); }