CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Web.Mvc.ViewModelBase< T > Class Template Reference

Base class used to create ViewModel objects that contain the Model object and related elements. More...

Inheritance diagram for Csla.Web.Mvc.ViewModelBase< T >:
Csla.Web.Mvc.IViewModel

Public Member Functions

virtual bool Save (ModelStateDictionary modelState, bool forceUpdate)
 Saves the current Model object if the object implements Csla.Core.ISavable. More...
 

Properties

ModelObject [getset]
 Gets or sets the Model object. More...
 
- Properties inherited from Csla.Web.Mvc.IViewModel
object ModelObject [getset]
 Object property for the contained business object More...
 

Detailed Description

Base class used to create ViewModel objects that contain the Model object and related elements.

Template Parameters
TType of the Model object.
Type Constraints
T :class 

Definition at line 22 of file Csla.Web.Mvc.Shared/ViewModelBase.cs.

Member Function Documentation

◆ Save()

virtual bool Csla.Web.Mvc.ViewModelBase< T >.Save ( ModelStateDictionary  modelState,
bool  forceUpdate 
)
virtual

Saves the current Model object if the object implements Csla.Core.ISavable.

Parameters
modelStateController's ModelState object.
forceUpdateif set to true force update.
Returns
true if the save succeeds.

Definition at line 44 of file Csla.Web.Mvc.Shared/ViewModelBase.cs.

Property Documentation

◆ ModelObject

T Csla.Web.Mvc.ViewModelBase< T >.ModelObject
getset

Gets or sets the Model object.

Definition at line 33 of file Csla.Web.Mvc.Shared/ViewModelBase.cs.