コード例 #1
0
        public ResponseMessage <Profile> ChangeName(ChangeNameRequest entity)
        {
            ResponseMessage <Profile> response = new ResponseMessage <Profile>();
            Profile profileEntity = _profileRepository.GetByID(entity.PublicID.Reverse());

            try
            {
                profileEntity.Name      = entity.NewName;
                response.ResponseObject = _profileRepository.ChangeName(profileEntity);
                response.IsSuccess      = true;
                response.ErrorMessage   = "Success";
            }
            catch (Exception ex)
            {
                response.IsSuccess    = false;
                response.ErrorMessage = ex.Message;
            }

            return(response);
        }