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.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< T > Csla.IChildDataPortal< T >

Public Member Functions

 DataPortal (ApplicationContext applicationContext, DataPortalClient.IDataPortalProxy proxy)
 Creates an instance of the type More...
 
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. More...
 
async Task< T > CreateAsync (params object[] criteria)
 Called by a factory method in a business class or by the UI to create a new object, which is loaded with default values from the database. More...
 
Fetch (params object[] criteria)
 Called by a factory method in a business class to Fetch a new object, which is loaded with default values from the database. More...
 
async Task< T > FetchAsync (params object[] criteria)
 Called by a factory method in a business class or by the UI to Fetch a new object, which is loaded with default values from the database. More...
 
Update (T obj)
 Called by a factory method in a business class or by the UI to update an object. More...
 
async Task< T > UpdateAsync (T obj)
 Called by a factory method in a business class or by the UI to update an object. More...
 
void Delete (params object[] criteria)
 Called by a factory method in a business class or by the UI to delete an object. More...
 
async Task DeleteAsync (params object[] criteria)
 Called by a factory method in a business class or by the UI to delete an object. More...
 
Execute (T command)
 Called by a factory method in a business class or by the UI to execute a command object. More...
 
async Task< T > ExecuteAsync (T command)
 Called by a factory method in a business class or by the UI to execute a command object. More...
 
CreateChild ()
 Creates and initializes a new child business object. More...
 
CreateChild (params object[] parameters)
 Creates and initializes a new child business object. More...
 
async Task< T > CreateChildAsync ()
 Creates and initializes a new child business object. More...
 
async Task< T > CreateChildAsync (params object[] parameters)
 Creates and initializes a new child business object. More...
 
FetchChild ()
 Fetches an existing child business object. More...
 
FetchChild (params object[] parameters)
 Fetches an existing child business object. More...
 
async Task< T > FetchChildAsync ()
 Fetches an existing child business object. More...
 
async Task< T > FetchChildAsync (params object[] parameters)
 Fetches an existing child business object. More...
 
void UpdateChild (T child)
 Inserts, updates or deletes an existing child business object. More...
 
void UpdateChild (object child, params object[] parameters)
 Inserts, updates or deletes an existing child business object. More...
 
void UpdateChild (T child, params object[] parameters)
 Inserts, updates or deletes an existing child business object. More...
 
async Task UpdateChildAsync (T child)
 Inserts, updates or deletes an existing child business object. More...
 
async Task UpdateChildAsync (T child, params object[] parameters)
 Inserts, updates or deletes an existing child business object. More...
 

Detailed Description

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

Template Parameters
TType of business object.

Definition at line 23 of file DataPortalT.cs.

Constructor & Destructor Documentation

◆ DataPortal()

Creates an instance of the type

Parameters
applicationContextApplicationContext
proxy

Definition at line 30 of file DataPortalT.cs.

Member Function Documentation

◆ Create()

T Csla.DataPortal< T >.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.

Implements Csla.IDataPortal< T >.

Definition at line 151 of file DataPortalT.cs.

◆ CreateAsync()

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

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

Parameters
criteriaObject-specific criteria.

Implements Csla.IDataPortal< T >.

Definition at line 184 of file DataPortalT.cs.

◆ CreateChild() [1/2]

T Csla.DataPortal< T >.CreateChild ( )

Creates and initializes a new child business object.

Definition at line 639 of file DataPortalT.cs.

◆ CreateChild() [2/2]

T Csla.DataPortal< T >.CreateChild ( params object[]  parameters)

Creates and initializes a new child business object.

Parameters
parametersParameters passed to child create method.

Implements Csla.IChildDataPortal< T >.

Definition at line 652 of file DataPortalT.cs.

◆ CreateChildAsync() [1/2]

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

Creates and initializes a new child business object.

Definition at line 662 of file DataPortalT.cs.

◆ CreateChildAsync() [2/2]

async Task< T > Csla.DataPortal< T >.CreateChildAsync ( params object[]  parameters)

Creates and initializes a new child business object.

Parameters
parametersParameters passed to child create method.

Implements Csla.IChildDataPortal< T >.

Definition at line 675 of file DataPortalT.cs.

◆ Delete()

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

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 >.

Definition at line 545 of file DataPortalT.cs.

◆ DeleteAsync()

async Task Csla.DataPortal< T >.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.

Implements Csla.IDataPortal< T >.

Definition at line 580 of file DataPortalT.cs.

◆ Execute()

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

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

Parameters
commandCommand object to execute.

Implements Csla.IDataPortal< T >.

Definition at line 590 of file DataPortalT.cs.

◆ ExecuteAsync()

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

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

Parameters
commandCommand object to execute.

Implements Csla.IDataPortal< T >.

Definition at line 600 of file DataPortalT.cs.

◆ Fetch()

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

Called by a factory method in a business class to Fetch 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 >.

Definition at line 247 of file DataPortalT.cs.

◆ FetchAsync()

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

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

Parameters
criteriaObject-specific criteria.

Implements Csla.IDataPortal< T >.

Definition at line 279 of file DataPortalT.cs.

◆ FetchChild() [1/2]

T Csla.DataPortal< T >.FetchChild ( )

Fetches an existing child business object.

Definition at line 685 of file DataPortalT.cs.

◆ FetchChild() [2/2]

T Csla.DataPortal< T >.FetchChild ( params object[]  parameters)

Fetches an existing child business object.

Parameters
parametersParameters passed to child fetch method.

Implements Csla.IChildDataPortal< T >.

Definition at line 698 of file DataPortalT.cs.

◆ FetchChildAsync() [1/2]

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

Fetches an existing child business object.

Definition at line 708 of file DataPortalT.cs.

◆ FetchChildAsync() [2/2]

async Task< T > Csla.DataPortal< T >.FetchChildAsync ( params object[]  parameters)

Fetches an existing child business object.

Parameters
parametersParameters passed to child fetch method.

Implements Csla.IChildDataPortal< T >.

Definition at line 721 of file DataPortalT.cs.

◆ Update()

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

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

Parameters
objObject to update.

Implements Csla.IDataPortal< T >.

Definition at line 467 of file DataPortalT.cs.

◆ UpdateAsync()

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

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

Parameters
objObject to update.

Implements Csla.IDataPortal< T >.

Definition at line 487 of file DataPortalT.cs.

◆ UpdateChild() [1/3]

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

Inserts, updates or deletes an existing child business object.

Parameters
childBusiness object to update.
parametersParameters passed to child update method.

Implements Csla.IChildDataPortal< T >.

Definition at line 750 of file DataPortalT.cs.

◆ UpdateChild() [2/3]

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

Inserts, updates or deletes an existing child business object.

Parameters
childBusiness object to update.

Definition at line 734 of file DataPortalT.cs.

◆ UpdateChild() [3/3]

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

Inserts, updates or deletes an existing child business object.

Parameters
childBusiness object to update.
parametersParameters passed to child update method.

Implements Csla.IChildDataPortal< T >.

Definition at line 766 of file DataPortalT.cs.

◆ UpdateChildAsync() [1/2]

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

Inserts, updates or deletes an existing child business object.

Parameters
childBusiness object to update.

Definition at line 779 of file DataPortalT.cs.

◆ UpdateChildAsync() [2/2]

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

Inserts, updates or deletes an existing child business object.

Parameters
childBusiness object to update.
parametersParameters passed to child update method.

Implements Csla.IChildDataPortal< T >.

Definition at line 795 of file DataPortalT.cs.