示例#1
0
 public async Task DeleteCourse(long courseId)
 {
     try
     {
         await _courseAppService.DeleteCourse(courseId);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
示例#2
0
 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));
     }
 }