public IActionResult Delete(int id)
 {
     _courseServices.DeleteCourse(id);
     if (id != 0)
     {
         return(Ok(id));
     }
     return(NotFound());
 }
 public ActionResult DeleteCourse([FromRoute] int id)
 {
     if (id <= 0)
     {
         return(BadRequest("Not a valid course id"));
     }
     else
     {
         _COURSEDAL.DeleteCourse(id);
     }
     return(Ok());
 }
示例#3
0
 public ActionResult <string> DeleteCourse(string code)
 {
     _service.DeleteCourse(code);
     //_logger.LogInformation("faculties", _faculties);
     return(code);
 }