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.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 (TransactionalAttribute transactionalAttribute)
 Initializes a new instance of the TransactionalDataPortal class. More...
 
async Task< DataPortalResultCreate (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Wraps a Create call in a TransactionScope More...
 
async Task< DataPortalResultFetch (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by the client-side DataProtal to retrieve an object. More...
 
async Task< DataPortalResultUpdate (object obj, DataPortalContext context, bool isSync)
 Called by the client-side DataPortal to update an object. More...
 
async Task< DataPortalResultDelete (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by the client-side DataPortal to delete an object. More...
 

Detailed Description

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

Definition at line 18 of file TransactionalDataPortal.cs.

Constructor & Destructor Documentation

◆ TransactionalDataPortal()

Csla.Server.TransactionalDataPortal.TransactionalDataPortal ( TransactionalAttribute  transactionalAttribute)

Initializes a new instance of the TransactionalDataPortal class.

Parameters
transactionalAttributeThe transactional attribute that defines transaction options to be used with transactions.

Definition at line 28 of file TransactionalDataPortal.cs.

Member Function Documentation

◆ Create()

async Task< DataPortalResult > Csla.Server.TransactionalDataPortal.Create ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

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

Implements Csla.Server.IDataPortalServer.

Definition at line 51 of file TransactionalDataPortal.cs.

◆ Delete()

async Task< DataPortalResult > Csla.Server.TransactionalDataPortal.Delete ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

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.

Implements Csla.Server.IDataPortalServer.

Definition at line 168 of file TransactionalDataPortal.cs.

◆ Fetch()

async Task< DataPortalResult > Csla.Server.TransactionalDataPortal.Fetch ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

Called by the client-side DataProtal 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.

Implements Csla.Server.IDataPortalServer.

Definition at line 114 of file TransactionalDataPortal.cs.

◆ Update()

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

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.

Implements Csla.Server.IDataPortalServer.

Definition at line 141 of file TransactionalDataPortal.cs.