Class EntityViewModel<T>
Base class for a ViewModelBase whose backing fields are part of an entity model.
Implements
Inherited Members
Namespace: TheXDS.MCART.Types.Base
Assembly: MCART.Mvvm.dll
Syntax
public class EntityViewModel<T> : ViewModelBase, INotifyPropertyChangeBase, IRefreshable, IEntityViewModel<T>, IEntityViewModel, INotifyPropertyChanged
Type Parameters
| Name | Description |
|---|---|
| T | The entity type used as the internal backing store for this ViewModel. |
Properties
| Edit this page View SourceEntity
The entity instance managed by this ViewModel.
Declaration
public virtual T Entity { get; set; }
Property Value
| Type | Description |
|---|---|
| T |
Methods
| Edit this page View SourceRefresh()
Notifies that properties of this EntityViewModel<T> have changed.
Declaration
public override void Refresh()
Overrides
| Edit this page View SourceUpdate(T)
Copies values from the provided T into the
entity instance held by this ViewModel.
Declaration
public virtual void Update(T entity)
Parameters
| Type | Name | Description |
|---|---|---|
| T | entity | The entity containing new values to apply to the current Entity instance. |
Operators
| Edit this page View Sourceimplicit operator T(EntityViewModel<T>)
Implicitly converts an EntityViewModel<T> to
T.
Declaration
public static implicit operator T(EntityViewModel<T> vm)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityViewModel<T> | vm | The EntityViewModel<T> to convert. |
Returns
| Type | Description |
|---|---|
| T |