PeekCollectionViewModel<TNavigationToken, TEntity, TPrimaryKey, TUnitOfWork> Members

A POCO view model exposing a read-only collection of entities of a given type. It is designed for quick navigation between collection views.

This is a partial class that provides an extension point to add custom properties, commands and override methods without modifying the auto-generated code.

Properties

Name Description
AllowSaveReset Inherited from EntitiesViewModelBase<TEntity, TProjection, TUnitOfWork>.
CanSerialize Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
DocumentManagerService Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
Entities The collection of entities loaded from the unit of work. Inherited from EntitiesViewModelBase<TEntity, TProjection, TUnitOfWork>.
EntityDisplayName The display name of TEntity to be used when presenting messages to the user. Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
FilterExpression The lambda expression used to filter which entities will be loaded locally from the unit of work. Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
IsLoading Used to check whether entities are currently being loaded in the background. The property can be used to show the progress indicator. Inherited from EntitiesViewModelBase<TEntity, TProjection, TUnitOfWork>.
LookupViewModels Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
ParentViewModel Inherited from EntitiesViewModelBase<TEntity, TProjection, TUnitOfWork>.
SelectedEntity The selected entity. Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
UnitOfWorkFactory Inherited from EntitiesViewModelBase<TEntity, TProjection, TUnitOfWork>.
UnitOfWorkPolicy Inherited from EntitiesViewModelBase<TEntity, TProjection, TUnitOfWork>.

Methods

Name Description
CanDelete(TProjection)

Determines whether an entity can be deleted. Since CollectionViewModelBase is a POCO view model, this method will be used as a CanExecute callback for DeleteCommand.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
CanEdit(TProjection)

Determines whether an entity can be edited. Since CollectionViewModelBase is a POCO view model, this method will be used as a CanExecute callback for EditCommand.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
CanNavigate(TEntity)

Determines if a navigation to corresponding collection view can be performed. Since PeekCollectionViewModel is a POCO view model, this method will be used as a CanExecute callback for NavigateCommand.

CanRefresh() Determines whether entities can be reloaded. Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
CanReset() Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
CanSave(TProjection)

Determines whether entity local changes can be saved. Since CollectionViewModelBase is a POCO view model, this method will be used as a CanExecute callback for SaveCommand.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
Close()

Closes the corresponding view. Since CollectionViewModelBase is a POCO view model, an the instance of this class will also expose the CloseCommand property that can be used as a binding source in views.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
Create(TNavigationToken, IUnitOfWorkFactory<TUnitOfWork>, Func<TUnitOfWork, IRepository<TEntity, TPrimaryKey>>, Func<IRepositoryQuery<TEntity>, IQueryable<TEntity>>) static Creates a new instance of PeekCollectionViewModel as a POCO view model.
Delete(TProjection)

Deletes a given entity from the repository and saves changes if confirmed by the user. Since CollectionViewModelBase is a POCO view model, an the instance of this class will also expose the DeleteCommand property that can be used as a binding source in views.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
Edit(TProjection)

Creates and shows a document that contains a single object view model for the existing entity. Since CollectionViewModelBase is a POCO view model, an the instance of this class will also expose the EditCommand property that can be used as a binding source in views.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
Navigate(TEntity)

Navigates to the corresponding collection view and selects the given entity. Since PeekCollectionViewModel is a POCO view model, an instance of this class will also expose the NavigateCommand property that can be used as a binding source in views.

New()

Creates and shows a document that contains a single object view model for new entity. Since CollectionViewModelBase is a POCO view model, an the instance of this class will also expose the NewCommand property that can be used as a binding source in views.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
OnLoaded() Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
OnUnloaded() Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
Refresh() Reloads entities. Inherited from ReadOnlyCollectionViewModelBase<TEntity, TProjection, TUnitOfWork>.
Reset() Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
RestoreState(CollectionViewModelState) Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
Save(TProjection)

Saves the given entity. Since CollectionViewModelBase is a POCO view model, the instance of this class will also expose the SaveCommand property that can be used as a binding source in views.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
SaveState() Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
SendRefreshCollectionsMessage() Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
ToString() Returns a string that represents the current object. Inherited from Object.
UpdateSelectedEntity()

Notifies that SelectedEntity has been changed by raising the PropertyChanged event. Since CollectionViewModelBase is a POCO view model, an the instance of this class will also expose the UpdateSelectedEntityCommand property that can be used as a binding source in views.

Inherited from CollectionViewModelBase<TEntity, TProjection, TPrimaryKey, TUnitOfWork>.
See Also