예제 #1
0
 public bool Delete(int id)
 {
     if (skillService.GetByID(id) != null)
     {
         skillService.Remove(id);
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
 public ActionResult <Person> Delete(Guid id)
 {
     _skillService.Remove(id);
     return(null);
 }