Skip to main content

SingleObjectViewModelBase<TEntity, TPrimaryKey, TUnitOfWork> Members

The base class for POCO view models exposing a single entity of a given type and CRUD operations against this entity.

It is not recommended to inherit directly from this class. Use the SingleObjectViewModel class instead.

Properties

Name Description
AllowSaveReset
Entity An entity represented by this view model.
EntityDisplayName The display name of TEntity to be used when presenting messages to the user.
IsPrimaryKeyReadOnly
ParentViewModel
Title The display text for a given entity used as a title in the corresponding view.
UnitOfWorkFactory

Methods

Name Description
CanDelete() Determines whether the entity can be deleted.
CanReset() Determines whether entity has local changes.
CanSave() Determines whether entity has local changes that can be saved.
Close() Closes the corresponding view.
Delete() Deletes the entity, save changes and closes the corresponding view if confirmed by a user.
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.
IsNew()
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
OnLoaded()
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
Reset() Reset entity local changes.
ResetLayout()
Save() Saves changes in the underlying unit of work.
SaveAndClose() Saves changes in the underlying unit of work and closes the corresponding view.
SaveAndNew() Saves changes in the underlying unit of work and create new entity.
SaveLayout()
ToString() Returns a string that represents the current object. Inherited from Object.
Update() Updates the Title property value and raises CanExecute changed for relevant commands.
See Also