public object this[Type type]
        {
            get
            {
                var key            = ProfileStorage.Key(type);
                var profileStorage = _persister.FindBy(_profileId, key).FirstOrDefault();
                return(profileStorage != null?profileStorage.GetValue() : null);
            }
            set
            {
                if (value == null)
                {
                    return;
                }

                var key          = ProfileStorage.Key(value.GetType());
                var valueStorage = _persister.FindBy(_profileId, key).FirstOrDefault();

                if (valueStorage != null)
                {
                    valueStorage.SetValue(value);
                    _persister.Update(valueStorage);
                }
                else
                {
                    valueStorage = new ProfileStorage(new TypeNameWithoutVersion(value.GetType()))
                    {
                        ProfileId = _profileId.Value
                    };
                    valueStorage.SetValue(value);
                    _persister.Insert(valueStorage);
                }
            }
        }
        public ProfileToStorageAdapter(ProfileId profileId, IProfileStoragePersister persister, Type keyType, params StorageName[] storageNames)
        {
            _profileId = profileId;
            _key       = ProfileStorage.Key(keyType);

            if (storageNames == null)
            {
                _persistanceStrategy = new NotNamedStoragePersistanceStrategy(persister, profileId, _key);
            }
            else
            {
                _persistanceStrategy = new NamedStoragePersistanceStrategy(persister, profileId, _key, storageNames);
            }
        }