public async Task <IActionResult> CreateLearningEvent([FromBody] LearningEventView learningEventView) { var lEvent = _mapper.Map <LearningEvent>(learningEventView); var id = await _learningService.AddLearningEventAsync(lEvent).ConfigureAwait(false); await GetLearningEvent((int)id); return(Ok(id)); }
public async Task <IActionResult> UpdateEvent(int id, [FromBody] LearningEventView learningEventView) { await _learningService.Update(id, _mapper.Map <LearningEvent>(learningEventView)); return(Ok()); }