public async Task <IActionResult> Delete([FromRoute] Guid id) { if (await _employeeService.Delete(id)) { return(Ok(true)); } return(BadRequest("No se ha podido eliminar el empleado")); }
public ActionResult Delete(int idToDelete) { try { _employeService.Delete(idToDelete, _donneNomPrenomUtilisateur()); _employeService.Save(); FlashMessage.Confirmation("Suppression de l'employé"); } catch (Exception) { FlashMessage.Danger("Erreur lors de la suppression de l'employé"); throw; } return(RedirectToAction("Index")); }
public IActionResult Delete(long id) { _employeService.Delete(id); return(new NoContentResult()); }