CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.DataPortal< T > Class Template Reference

Client side data portal used for making asynchronous data portal calls in .NET. More...

Inheritance diagram for Csla.DataPortal< T >:
Csla.IDataPortal< T > Csla.IChildDataPortal< T > Csla.IDataPortal Csla.IChildDataPortal

Public Member Functions

 DataPortal (ApplicationContext applicationContext, IDataPortalProxy proxy, IDataPortalCache dataPortalCache, DataPortalOptions dataPortalOptions)
 Creates an instance of the type.
Create (params object?[]? criteria)
 Called by a factory method in a business class to create a new object, which is loaded with default values from the database.
Parameters
criteriaObject-specific criteria.
Returns
A new object, populated with default values.

async Task< T > CreateAsync (params object?[]? criteria)
 Starts an asynchronous data portal operation to create a business object.
Parameters
criteriaCriteria describing the object to create.

Fetch (params object?[]? criteria)
 Called by a factory method in a business class to retrieve an object, which is loaded with values from the database.
Parameters
criteriaObject-specific criteria.
Returns
An object populated with values from the database.

async Task< T > FetchAsync (params object?[]? criteria)
 Starts an asynchronous data portal operation to create a business object.
Parameters
criteriaCriteria describing the object to create.

Update (T obj)
 Called by the business object's Save() method to insert, update or delete an object in the database.Note that this method returns a reference to the updated business object. If the server-side DataPortal is running remotely, this will be a new and different object from the original, and all object references MUST be updated to use this new object.
Task< T > UpdateAsync (T obj)
 Called by a factory method in a business class or by the UI to update an object.
Parameters
objObject to update.
Exceptions
ArgumentNullExceptionobj is null.

void Delete (params object?[]? criteria)
 Called by a Shared (static in C#) method in the business class to cause immediate deletion of a specific object from the database.
Parameters
criteriaObject-specific criteria.

Task DeleteAsync (params object?[]? criteria)
 Called by a factory method in a business class or by the UI to delete an object.
Parameters
criteriaObject-specific criteria.

Execute (T command)
 Called to execute a Command object on the server.To be a Command object, the object must inherit from CommandBase.
Execute (params object?[]? criteria)
 Execute a command on the logical server.
Parameters
criteriaCriteria provided to the command object.
Returns
The resulting command object.

Task< T > ExecuteAsync (T command)
 Called by a factory method in a business class or by the UI to execute a command object.
Parameters
commandCommand object to execute.
Exceptions
ArgumentNullExceptioncommand is null.

async Task< T > ExecuteAsync (params object?[]? criteria)
 Execute a command on the logical server.
Parameters
criteriaCriteria provided to the command object.
Returns
The resulting command object.

CreateChild ()
 Creates and initializes a new child business object.
CreateChild (params object?[]? criteria)
 Called by a factory method in a business class to create a new object, which is loaded with default values from the database.
Parameters
criteriaObject-specific criteria.
Returns
A new object, populated with default values.

async Task< T > CreateChildAsync ()
 Creates and initializes a new child business object.
async Task< T > CreateChildAsync (params object?[]? criteria)
 Starts an asynchronous data portal operation to create a business object.
Parameters
criteriaCriteria describing the object to create.

FetchChild ()
 Fetches an existing child business object.
FetchChild (params object?[]? criteria)
 Called by a factory method in a business class to retrieve an object, which is loaded with values from the database.
Parameters
criteriaObject-specific criteria.
Returns
An object populated with values from the database.

async Task< T > FetchChildAsync ()
 Fetches an existing child business object.
async Task< T > FetchChildAsync (params object?[]? criteria)
 Starts an asynchronous data portal operation to create a business object.
Parameters
criteriaCriteria describing the object to create.

void UpdateChild (T child)
void UpdateChild (ICslaObject child, params object?[]? parameters)
 Called by the business object's Save() method to insert, update or delete an object in the database.Note that this method returns a reference to the updated business object. If the server-side DataPortal is running remotely, this will be a new and different object from the original, and all object references MUST be updated to use this new object.
void UpdateChild (T child, params object?[]? parameters)
 Called by the business object's Save() method to insert, update or delete an object in the database.Note that this method returns a reference to the updated business object. If the server-side DataPortal is running remotely, this will be a new and different object from the original, and all object references MUST be updated to use this new object.
async Task UpdateChildAsync (T child)
async Task UpdateChildAsync (T child, params object?[]? parameters)
 Called by a factory method in a business class or by the UI to update an object.
Parameters
childObject to update.
parametersAdditional, optional parameters to pass.
Exceptions
ArgumentNullExceptionchild is null.

Detailed Description

Client side data portal used for making asynchronous data portal calls in .NET.

Template Parameters
TType of business object.
Type Constraints
T :notnull 
T :ICslaObject 

Member Function Documentation

◆ Create()

T Csla.DataPortal< T >.Create ( params object??[] criteria)
inline

Called by a factory method in a business class to create a new object, which is loaded with default values from the database.

Parameters
criteriaObject-specific criteria.
Returns
A new object, populated with default values.

Implements Csla.IDataPortal< T >.

◆ CreateAsync()

async Task< T > Csla.DataPortal< T >.CreateAsync ( params object??[] criteria)
inline

Starts an asynchronous data portal operation to create a business object.

Parameters
criteriaCriteria describing the object to create.

Implements Csla.IDataPortal< T >.

◆ CreateChild() [1/2]

T Csla.DataPortal< T >.CreateChild ( )
inline

Creates and initializes a new child business object.

◆ CreateChild() [2/2]

T Csla.DataPortal< T >.CreateChild ( params object??[] criteria)
inline

Called by a factory method in a business class to create a new object, which is loaded with default values from the database.

Parameters
criteriaObject-specific criteria.
Returns
A new object, populated with default values.

Implements Csla.IChildDataPortal< T >.

◆ CreateChildAsync() [1/2]

async Task< T > Csla.DataPortal< T >.CreateChildAsync ( )
inline

Creates and initializes a new child business object.

◆ CreateChildAsync() [2/2]

async Task< T > Csla.DataPortal< T >.CreateChildAsync ( params object??[] criteria)
inline

Starts an asynchronous data portal operation to create a business object.

Parameters
criteriaCriteria describing the object to create.

Implements Csla.IChildDataPortal< T >.

◆ DataPortal()

Csla.DataPortal< T >.DataPortal ( ApplicationContext applicationContext,
IDataPortalProxy proxy,
IDataPortalCache dataPortalCache,
DataPortalOptions dataPortalOptions )
inline

Creates an instance of the type.

Parameters
applicationContextApplicationContext
proxy
dataPortalCacheData portal cache service
dataPortalOptions
Exceptions
ArgumentNullExceptionapplicationContext , proxy , dataPortalCache or dataPortalOptions is null.

◆ Delete()

void Csla.DataPortal< T >.Delete ( params object??[] criteria)
inline

Called by a Shared (static in C#) method in the business class to cause immediate deletion of a specific object from the database.

Parameters
criteriaObject-specific criteria.

Implements Csla.IDataPortal< T >.

◆ DeleteAsync()

Task Csla.DataPortal< T >.DeleteAsync ( params object??[] criteria)
inline

Called by a factory method in a business class or by the UI to delete an object.

Parameters
criteriaObject-specific criteria.

Implements Csla.IDataPortal< T >.

◆ Execute() [1/2]

T Csla.DataPortal< T >.Execute ( params object??[] criteria)
inline

Execute a command on the logical server.

Parameters
criteriaCriteria provided to the command object.
Returns
The resulting command object.

Implements Csla.IDataPortal< T >.

◆ Execute() [2/2]

T Csla.DataPortal< T >.Execute ( T command)
inline

Called to execute a Command object on the server.To be a Command object, the object must inherit from CommandBase.

Implements Csla.IDataPortal< T >.

◆ ExecuteAsync() [1/2]

async Task< T > Csla.DataPortal< T >.ExecuteAsync ( params object??[] criteria)
inline

Execute a command on the logical server.

Parameters
criteriaCriteria provided to the command object.
Returns
The resulting command object.

Implements Csla.IDataPortal< T >.

◆ ExecuteAsync() [2/2]

Task< T > Csla.DataPortal< T >.ExecuteAsync ( T command)
inline

Called by a factory method in a business class or by the UI to execute a command object.

Parameters
commandCommand object to execute.
Exceptions
ArgumentNullExceptioncommand is null.

Implements Csla.IDataPortal< T >.

◆ Fetch()

T Csla.DataPortal< T >.Fetch ( params object??[] criteria)
inline

Called by a factory method in a business class to retrieve an object, which is loaded with values from the database.

Parameters
criteriaObject-specific criteria.
Returns
An object populated with values from the database.

Implements Csla.IDataPortal< T >.

◆ FetchAsync()

async Task< T > Csla.DataPortal< T >.FetchAsync ( params object??[] criteria)
inline

Starts an asynchronous data portal operation to create a business object.

Parameters
criteriaCriteria describing the object to create.

Implements Csla.IDataPortal< T >.

◆ FetchChild() [1/2]

T Csla.DataPortal< T >.FetchChild ( )
inline

Fetches an existing child business object.

◆ FetchChild() [2/2]

T Csla.DataPortal< T >.FetchChild ( params object??[] criteria)
inline

Called by a factory method in a business class to retrieve an object, which is loaded with values from the database.

Parameters
criteriaObject-specific criteria.
Returns
An object populated with values from the database.

Implements Csla.IChildDataPortal< T >.

◆ FetchChildAsync() [1/2]

async Task< T > Csla.DataPortal< T >.FetchChildAsync ( )
inline

Fetches an existing child business object.

◆ FetchChildAsync() [2/2]

async Task< T > Csla.DataPortal< T >.FetchChildAsync ( params object??[] criteria)
inline

Starts an asynchronous data portal operation to create a business object.

Parameters
criteriaCriteria describing the object to create.

Implements Csla.IChildDataPortal< T >.

◆ Update()

T Csla.DataPortal< T >.Update ( T obj)
inline

Called by the business object's Save() method to insert, update or delete an object in the database.Note that this method returns a reference to the updated business object. If the server-side DataPortal is running remotely, this will be a new and different object from the original, and all object references MUST be updated to use this new object.

Implements Csla.IDataPortal< T >.

◆ UpdateAsync()

Task< T > Csla.DataPortal< T >.UpdateAsync ( T obj)
inline

Called by a factory method in a business class or by the UI to update an object.

Parameters
objObject to update.
Exceptions
ArgumentNullExceptionobj is null.

Implements Csla.IDataPortal< T >.

◆ UpdateChild() [1/3]

void Csla.DataPortal< T >.UpdateChild ( ICslaObject child,
params object??[] parameters )
inline

Called by the business object's Save() method to insert, update or delete an object in the database.Note that this method returns a reference to the updated business object. If the server-side DataPortal is running remotely, this will be a new and different object from the original, and all object references MUST be updated to use this new object.

Implements Csla.IChildDataPortal.

◆ UpdateChild() [2/3]

void Csla.DataPortal< T >.UpdateChild ( T child)
inline

◆ UpdateChild() [3/3]

void Csla.DataPortal< T >.UpdateChild ( T child,
params object??[] parameters )
inline

Called by the business object's Save() method to insert, update or delete an object in the database.Note that this method returns a reference to the updated business object. If the server-side DataPortal is running remotely, this will be a new and different object from the original, and all object references MUST be updated to use this new object.

Implements Csla.IChildDataPortal< T >.

◆ UpdateChildAsync() [1/2]

async Task Csla.DataPortal< T >.UpdateChildAsync ( T child)
inline

◆ UpdateChildAsync() [2/2]

async Task Csla.DataPortal< T >.UpdateChildAsync ( T child,
params object??[] parameters )
inline

Called by a factory method in a business class or by the UI to update an object.

Parameters
childObject to update.
parametersAdditional, optional parameters to pass.
Exceptions
ArgumentNullExceptionchild is null.

Implements Csla.IChildDataPortal< T >.


The documentation for this class was generated from the following file: