Exemplo n.º 1
0
 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());
 }
Exemplo n.º 3
0
 public ActionResult <string> DeleteCourse(string code)
 {
     _service.DeleteCourse(code);
     //_logger.LogInformation("faculties", _faculties);
     return(code);
 }