コード例 #1
0
        public async Task <IActionResult> AddEducation([FromBody] AddEducationViewModel model)
        {
            try
            {
                var result = await _profileService.AddNewEducation(model);

                if (result == false)
                {
                    return(Json(new { Success = false, data = "can not add the education." }));
                }
                return(Json(new { Success = true, data = "add successful" }));
            }
            catch (Exception e)
            {
                return(Json(new { Success = false, data = "error" }));
            }
        }