public void UpdateUserPanelInfo(UpdateUserPanelCommand command)
        {
            var user = _panelRepository.FindUser(command.UserId).Result;

            if (user == null)
            {
                throw new CustomException("کاربر یافت نشد");
            }
            _panelRepository.UpdateUserInfo(user.UserName, command.FirstName, command.LastName, command.NationalCode, command.MobileNumber, command.Email);
        }
 public IHttpActionResult Put(UpdateUserPanelCommand command)
 {
     try
     {
         _panelSecutiytCommandService.UpdateUserPanelInfo(command);
         return(Ok(new ResponseModel
         {
             Message = "ویرایش  کاربر با موفقیت انجام شد",
             Success = true,
         }));
     }
     catch (Exception e)
     {
         return(Ok(new ResponseModel
         {
             Message = e.Message,
             Success = false,
         }));
     }
 }