public IActionResult DeleteStudent(string id) { if (_dbService.GetStudent(id) != null) { _dbService.DeleteStudent(id); return(Ok("Proces usuwania zakończony")); } return(NotFound("Nie ma studenta o tym id")); }
public IActionResult DeleteStudent(string id) { if (_dbService.GetStudent(id) != null) { _dbService.DeleteStudent(id); return(Ok("Usuwanie zakończone")); } return(NotFound("Nie znaleziono studenta o tym id")); }
public IActionResult DeleteStudent(string id) { var response = _dbContext.DeleteStudent(id); if (response != null) { return(Ok(response)); } return(NotFound("Nie mamy studentów")); }
public IActionResult DeleteStudent(string index) { var res = _service.DeleteStudent(index); if (res == true) { return(Ok("Usunieto studenta o indeksie " + index)); } else { return(NotFound("Nie ma takiego studenta")); } }
public async Task <IActionResult> DeleteStudent(string sIndex) { int res = await _service.DeleteStudent(sIndex); if (res == -1) { return(NotFound("Student with given index does not exist")); } else { return(Ok("Student deleted")); } }
public IActionResult DeleteStudent(string index) { var result = _dbService.DeleteStudent(index); if (result.Equals("OK")) { return(Ok("Student was deleted")); } else if (result.Equals("Bad Request")) { return(BadRequest()); } else { return(NotFound()); } }
public IActionResult DeleteStudent(int id) { _studentsDbService.DeleteStudent(id); return(Ok("Usuwanie ukończone")); }
public IActionResult DeleteStudent(string indexNumber) { _dbService.DeleteStudent(indexNumber); return(Ok("Deleted")); }
public IActionResult DeleteStudent(string index) { _studentsDbService.DeleteStudent(index); return(Ok("Usuwanie ukończone")); }