CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Web.Mvc.Controller Class Reference

Provides methods that respond to HTTP requests in an ASP.NET MVC web site. More...

Inheritance diagram for Csla.Web.Mvc.Controller:

Public Member Functions

 Controller (ApplicationContext applicationContext)
 Creates a new instance of the type. More...
 

Protected Member Functions

bool SaveObject< T > (T item, bool forceUpdate)
 Performs a Save() operation on an editable business object, with appropriate validation and exception handling. More...
 
virtual bool SaveObject< T > (T item, Action< T > updateModel, bool forceUpdate)
 Performs a Save() operation on an editable business object, with appropriate validation and exception handling. More...
 
void LoadProperty< P > (object obj, PropertyInfo< P > propertyInfo, P newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change. More...
 

Properties

ApplicationContext ApplicationContext [get]
 Gets a reference to the current ApplicationContext. More...
 

Detailed Description

Provides methods that respond to HTTP requests in an ASP.NET MVC web site.

Definition at line 30 of file Controller.cs.

Constructor & Destructor Documentation

◆ Controller()

Csla.Web.Mvc.Controller.Controller ( ApplicationContext  applicationContext)

Creates a new instance of the type.

Parameters
applicationContext

Definition at line 37 of file Controller.cs.

Member Function Documentation

◆ LoadProperty< P >()

void Csla.Web.Mvc.Controller.LoadProperty< P > ( object  obj,
PropertyInfo< P >  propertyInfo,
newValue 
)
protected

Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.

Template Parameters
PType of the property.
Parameters
objObject on which to call the method.
propertyInfoPropertyInfo object containing property metadata.
newValueThe new value for the property.

No authorization checks occur when this method is called, and no PropertyChanging or PropertyChanged events are raised. Loading values does not cause validation rules to be invoked.

Definition at line 206 of file Controller.cs.

◆ SaveObject< T >() [1/2]

virtual bool Csla.Web.Mvc.Controller.SaveObject< T > ( item,
Action< T >  updateModel,
bool  forceUpdate 
)
protectedvirtual

Performs a Save() operation on an editable business object, with appropriate validation and exception handling.

Template Parameters
TType of business object.
Parameters
itemThe business object to insert.
updateModelDelegate that invokes the UpdateModel() method.
forceUpdatetrue to force Save() to be an update.
Returns
true the Save() succeeds, false if not.
Type Constraints
T :class 
T :Core.ISavable 

Definition at line 155 of file Controller.cs.

◆ SaveObject< T >() [2/2]

bool Csla.Web.Mvc.Controller.SaveObject< T > ( item,
bool  forceUpdate 
)
protected

Performs a Save() operation on an editable business object, with appropriate validation and exception handling.

Template Parameters
TType of business object.
Parameters
itemThe business object to insert.
forceUpdatetrue to force Save() to be an update.
Returns
true the Save() succeeds, false if not.
Type Constraints
T :class 
T :Core.ISavable 

Definition at line 137 of file Controller.cs.

Property Documentation

◆ ApplicationContext

ApplicationContext Csla.Web.Mvc.Controller.ApplicationContext
getprotected

Gets a reference to the current ApplicationContext.

Definition at line 45 of file Controller.cs.