Exemplo n.º 1
0
        public JsonResult RemoveEducation(RemoveUserEducationRequest input)
        {
            _user = GetUser(HttpContext);

            var education = _educationService.Find(ue => ue.OwnerUserId == _user.Id && ue.Id == input.Id).Data;

            if (education == null)
            {
                throw new CustomException("رکوردی برای حذف وجود ندارد",
                                          ErrorsPreFix.CONTROLLER_ACOUNT + ERROR_REMOVE_EDUCATION + "02");
            }

            _educationService.Disable(education.Id, _user.Id);

            return(new JsonResult(GetEducations().Value));
        }