Skip to main content
A newer version of this page is available. .

PeekCollectionViewModel<TNavigationToken, TEntity, TPrimaryKey, TUnitOfWork> Methods

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.

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, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. 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