Пример #1
0
        public async Task DeleteLessonAsync(LessonDeleteInputModel inputModel)
        {
            await lessonService.DeleteLessonAsync(inputModel);

            memoryCache.Remove($"Course{inputModel.CourseId}");
            memoryCache.Remove($"Lesson{inputModel.Id}");
        }
        public async Task<IActionResult> DeleteLessonAsync(int id)
        {
            //temporary
            if (await lessonService.DeleteLessonAsync(id))
            {
                return Ok();
            }

            return BadRequest();
        }