Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
		public ProfileDomainObject Create(Profile profile, AccountName accountName)
		{
			return new ProfileDomainObject(profile.Name, accountName, profile.Initialized, _pluginMetadata.ProfileType)
					{
						EventAggregator = _eventAggregator,
						ProfileRepository = this,
						StorageRepository = new ProfileStorageRepository(new ProfileId(profile.Id), _profileStoragePersister, _pluginMetadata)
					};
		}
		public Profile Add(ProfileName profileName, bool initialized, AccountName accountName)
		{
			using (var context = CreateDataContext())
			{
				var profiles = SelectAccount(context.Accounts, accountName).Single().Profiles;
				var profileToSave = new Profile {Name = profileName.Value, Initialized = initialized};
				profiles.Add(profileToSave);
				context.SubmitChanges();
				return profileToSave;
			}
		}
		public Profile Add(ProfileName profileName, bool initialized,  AccountName accountName)
		{
			var profile = new Profile {Name = profileName.Value, Id = Id(), Initialized = initialized};
			if (_profiles.ContainsKey(accountName))
			{
				_profiles[accountName].Add(profile);
			}
			else
			{
				_profiles.Add(accountName, new List<Profile> {profile});
			}
			return profile;
		}
		protected override void OnInit()
		{
			ObjectFactory.GetInstance<IAccountCollection>().GetOrCreate("Account");
			_profile = ObjectFactory.GetInstance<IProfilePersister>().Add("Profile", true, "Account");
			_persister = ObjectFactory.GetInstance<ProfileStorageSqlPersister>();
		}
 partial void DeleteProfile(Profile instance);
 partial void UpdateProfile(Profile instance);
 partial void InsertProfile(Profile instance);
		private void detach_Profiles(Profile entity)
		{
			this.SendPropertyChanging();
			entity.Account = null;
		}
		private void attach_Profiles(Profile entity)
		{
			this.SendPropertyChanging();
			entity.Account = this;
		}
		private void SaveSettings(object settings, Profile profileCreated)
		{
			var storage = new ProfileStorageCollection(new ProfileId(profileCreated.Id), _profileStoragePersister);
			storage[settings.GetType()] = settings;
		}