コード例 #1
0
        public IActionResult DeleteCourse(int id)
        {
            var course = _data.GetFullCourse(id);

            _data.DeleteCourse(course);
            return(Ok());
        }
コード例 #2
0
        public IActionResult Delete(int id)
        {
            var course = _courseData.GetFullCourse(id);

            _courseData.DeleteCourse(course);
            return(RedirectToAction("Index"));
        }
コード例 #3
0
        public async Task <IActionResult> Delete(int id)
        {
            var course = _courseData.GetFullCourse(id);

            _courseData.DeleteCourse(course);

            return(RedirectToAction("Index", "Profile"));
        }