CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Server.TransactionalDataPortal Class Reference

Implements the server-side Serviced DataPortal described in Chapter 4. More...

Inheritance diagram for Csla.Server.TransactionalDataPortal:
Csla.Server.IDataPortalServer

Public Member Functions

 TransactionalDataPortal (DataPortalBroker dataPortalBroker, TransactionalAttribute transactionalAttribute)
 Initializes a new instance of the TransactionalDataPortal class.
async Task< DataPortalResultCreate ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, object criteria, DataPortalContext context, bool isSync)
 Wraps a Create call in a TransactionScope.
async Task< DataPortalResultFetch ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by the client-side DataPortal to retrieve an object.
async Task< DataPortalResultUpdate (ICslaObject obj, DataPortalContext context, bool isSync)
 Called by the client-side DataPortal to update an object.
async Task< DataPortalResultDelete ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by the client-side DataPortal to delete an object.

Detailed Description

Implements the server-side Serviced DataPortal described in Chapter 4.

Constructor & Destructor Documentation

◆ TransactionalDataPortal()

Csla.Server.TransactionalDataPortal.TransactionalDataPortal ( DataPortalBroker dataPortalBroker,
TransactionalAttribute transactionalAttribute )
inline

Initializes a new instance of the TransactionalDataPortal class.

Parameters
dataPortalBrokerThe broker that is used to perform the data access operation
transactionalAttributeThe transactional attribute that defines transaction options to be used with transactions.
Exceptions
ArgumentNullExceptiondataPortalBroker or transactionalAttribute is null.

Member Function Documentation

◆ Create()

async Task< DataPortalResult > Csla.Server.TransactionalDataPortal.Create ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType,
object criteria,
DataPortalContext context,
bool isSync )
inline

Wraps a Create call in a TransactionScope.

This method delegates to SimpleDataPortal but wraps that call within a TransactionScope to provide transactional support via System.Transactions.

Parameters
objectTypeA System.Type object indicating the type of business object to be created.
criteriaA custom criteria object providing any extra information that may be required to properly create the object.
contextContext data from the client.
isSyncTrue if the client-side proxy should synchronously invoke the server.
Returns
A populated business object.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

Implements Csla.Server.IDataPortalServer.

◆ Delete()

async Task< DataPortalResult > Csla.Server.TransactionalDataPortal.Delete ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType,
object criteria,
DataPortalContext context,
bool isSync )
inline

Called by the client-side DataPortal to delete an object.

This method delegates to SimpleDataPortal but wraps that call within a TransactionScope to provide transactional support via System.Transactions.

Parameters
objectTypeType of business object to create.
criteriaObject-specific criteria.
contextContext data from the client.
isSyncTrue if the client-side proxy should synchronously invoke the server.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

Implements Csla.Server.IDataPortalServer.

◆ Fetch()

async Task< DataPortalResult > Csla.Server.TransactionalDataPortal.Fetch ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType,
object criteria,
DataPortalContext context,
bool isSync )
inline

Called by the client-side DataPortal to retrieve an object.

This method delegates to SimpleDataPortal but wraps that call within a TransactionScope to provide transactional support via System.Transactions.

Parameters
objectTypeType of business object to retrieve.
criteriaObject-specific criteria.
contextObject containing context data from client.
isSyncTrue if the client-side proxy should synchronously invoke the server.
Returns
A populated business object.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

Implements Csla.Server.IDataPortalServer.

◆ Update()

async Task< DataPortalResult > Csla.Server.TransactionalDataPortal.Update ( ICslaObject obj,
DataPortalContext context,
bool isSync )
inline

Called by the client-side DataPortal to update an object.

This method delegates to SimpleDataPortal but wraps that call within a TransactionScope to provide transactional support via System.Transactions.

Parameters
objA reference to the object being updated.
contextContext data from the client.
isSyncTrue if the client-side proxy should synchronously invoke the server.
Returns
A reference to the newly updated object.
Exceptions
ArgumentNullExceptionobj or context is null.

Implements Csla.Server.IDataPortalServer.


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