public bool UpdateSkill(SkillUpdateModel skillUpdateModel) { bool check = false; Skill skill = _unitOfWork.GetRepository <Skill>().FindById(skillUpdateModel.id); if (skill != null) { skill.SkillName = skillUpdateModel.Name; _unitOfWork.GetRepository <Skill>().Update(skill); _unitOfWork.Commit(); check = true; } return(check); }
public IActionResult UpdateSkill(SkillUpdateModel skillUpdateModel) { if (skillUpdateModel == null) { return(BadRequest("Incorrect Parameter")); } bool check = _skillLogic.UpdateSkill(skillUpdateModel); if (!check) { return(BadRequest("Update Error")); } return(Ok("Update Skill Success")); }