private async Task UpdateLecture() { var id = _lecturesMenu.GetIdFromInput(); var lecture = await _lecturesService.GetByIdAsync(id); await _lecturesService.UpdateAsync(lecture); }
public async Task <IActionResult> Update([FromBody] MissedClass missedClass) { try { await _missedClassService.UpdateAsync(missedClass); _logger.LogInformation("Added new class"); return(Ok()); } catch (BusinessLogicException ex) { _logger.LogError(ex.Message); return(BadRequest(ex.Message)); } }