public IActionResult DeleteCourse(int id) { var course = _data.GetFullCourse(id); _data.DeleteCourse(course); return(Ok()); }
public IActionResult Delete(int id) { var course = _courseData.GetFullCourse(id); _courseData.DeleteCourse(course); return(RedirectToAction("Index")); }
public async Task <IActionResult> Delete(int id) { var course = _courseData.GetFullCourse(id); _courseData.DeleteCourse(course); return(RedirectToAction("Index", "Profile")); }