public IEnumerable<ProfileStorage> FindBy(ProfileId profileId) { return _profileStorage.FindAll(x => x.ProfileId == profileId.Value); }
public bool Contains(StorageName storageName, ProfileId profileId, TypeNameWithoutVersion key, object item) { return FindBy(storageName, profileId, key, item) != null; }
public ProfileStorage FindBy(StorageName storageName, ProfileId profileId, TypeNameWithoutVersion key, object item) { return FindBy(profileId, key).Where(x => x.GetValue() == item && storageName.Value == x.Name).FirstOrDefault(); }
public IEnumerable<ProfileStorage> FindBy(ProfileId profileId, TypeNameWithoutVersion key, params StorageName[] storageNames) { return FindBy(profileId).Where(x => x.ValueKey == key.Value && storageNames.Select(s => GetLowerOrNull(s.Value)).Contains(GetLowerOrNull(x.Name))); }
public IEnumerable<ProfileStorage> FindBy(ProfileId profileId, TypeNameWithoutVersion key) { return FindBy(profileId).Where(x => x.ValueKey == key.Value); }
public void Delete(ProfileId profileId, TypeNameWithoutVersion key, params StorageName[] storageNames) { _profileStorage.RemoveAll(x => storageNames.Select(s => s.Value).Contains(x.Name) && x.ProfileId == profileId.Value && x.ValueKey == key.Value); }
public void Delete(ProfileId profileId, TypeNameWithoutVersion key) { _profileStorage.RemoveAll(x => x.ProfileId == profileId.Value && x.ValueKey == key.Value); }