public bool Delete(int id) { if (skillService.GetByID(id) != null) { skillService.Remove(id); return(true); } else { return(false); } }
public ResultViewModel <SkillEditViewModel> Delete(int id) { ResultViewModel <SkillEditViewModel> result = new ResultViewModel <SkillEditViewModel>(); try { if (!ModelState.IsValid) { result.Message = "In Valid Model State"; } else { skillService.Remove(id); result.Successed = true; } } catch (Exception ex) { result.Successed = false; result.Message = "Semething Went Wrong"; } return(result); }
public ActionResult <Person> Delete(Guid id) { _skillService.Remove(id); return(null); }