public ActionResult Delete(int id) { var entity = _experienceService.GetById(id); _experienceService.Delete(entity); return(NoContent()); }
public IActionResult ExperienceDelete(int id) { var experienceToBeDeleted = _ExperienceService.GetById(id); if (experienceToBeDeleted != null) { _ExperienceService.Delete(experienceToBeDeleted); } return(Redirect("/social/experiencelist")); }
public IActionResult ConfirmedDeleteExperience(int experienceId) { var entity = _experienceService.GetById(experienceId); if (entity != null) { _experienceService.Delete(entity); } TempData.Put("message", new ResultMessage() { Title = "Bildirim", Message = "Tecrübe Bilgisi başarılı bir şekilde silindi.", Css = "success" }); return(RedirectToAction("Experiences")); }
public ActionResult DeleteExperience(int id, int ExperienceId) { Candidate c = candidateService.GetById(id); for (int i = 0; i < c.Experiences.Count; i++) { if (c.Experiences.ElementAt(i).ExperienceId == ExperienceId) { c.Experiences.Remove(c.Experiences.ElementAt(i)); break; } } candidateService.Update(c); candidateService.Commit(); Experience e = experienceService.GetById(ExperienceId); experienceService.Delete(e); experienceService.Commit(); return(RedirectToAction("Details", new { id })); }
public IActionResult Delete(Experience exp) { var result = _experienceService.Delete(exp); return result.Success ? Ok(result) : BadRequest(result.Message); }
public ActionResult Delete([FromRoute] int systemUserId, [FromRoute] int id) { _experienceService.Delete(systemUserId, id); return(Ok(MessageHelper.Success("The experience has been deleted."))); }