public async Task DeleteCourse(long courseId) { try { await _courseAppService.DeleteCourse(courseId); } catch (Exception e) { Console.WriteLine(e); throw; } }
public virtual IActionResult DeleteCourse([FromRoute] int id) { try { var serverCommand = _courseAppService.DeleteCourse(id); return(ReturnResponse(serverCommand, "Course Deleted!", null)); } catch (Exception e) { return(BadRequest("Error: " + e.Message)); } }