public async Task <ActionResult> AddSkill([FromBody] UserSkill skill) { try { string goodNews = "Skill Added successfully"; string talentId = _userAppContext.CurrentUserId; skill.Id = ObjectId.GenerateNewId().ToString(); skill.UserId = null; skill.IsDeleted = false; if (await _profileService.AddSkill(talentId, skill)) { return(Json(new { Success = true, data = goodNews })); } return(Json(new { Success = false })); } catch (Exception e) { return(Json(new { Success = false, message = e.Message })); } }