コード例 #1
0
        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));
        }
コード例 #2
0
        public async Task <IActionResult> UpdateEvent(int id, [FromBody] LearningEventView learningEventView)
        {
            await _learningService.Update(id, _mapper.Map <LearningEvent>(learningEventView));

            return(Ok());
        }