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.Server.DataPortal Class Reference

Implements the server-side DataPortal message router as discussed in Chapter 4. More...

Inheritance diagram for Csla.Server.DataPortal:
Csla.Server.IDataPortalServer Csla.Testing.Business.DataPortal.TestableDataPortal Csla.Testing.Business.DataPortal.TestableDataPortal

Public Member Functions

 DataPortal (ApplicationContext applicationContext, IDashboard dashboard, CslaOptions options, IAuthorizeDataPortal authorizer, InterceptorManager interceptors, IObjectFactoryLoader factoryLoader, IDataPortalActivator activator, IDataPortalExceptionInspector exceptionInspector, DataPortalExceptionHandler exceptionHandler)
 Creates an instance of the type. More...
 
async Task< DataPortalResultCreate (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Create a new business object. More...
 
async Task< DataPortalResultFetch (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Get an existing business object. More...
 
async Task< DataPortalResultUpdate (object obj, DataPortalContext context, bool isSync)
 Update a business object. More...
 
async Task< DataPortalResultDelete (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Delete a business object. More...
 

Static Public Member Functions

static object GetCriteriaFromArray (params object[] criteria)
 Converts a params array to a single serializable criteria value. More...
 
static object[] GetCriteriaArray (object criteria)
 Converts a single serializable criteria value into an array of type object. More...
 

Detailed Description

Implements the server-side DataPortal message router as discussed in Chapter 4.

Definition at line 23 of file DataPortal.cs.

Constructor & Destructor Documentation

◆ DataPortal()

Csla.Server.DataPortal.DataPortal ( ApplicationContext  applicationContext,
IDashboard  dashboard,
CslaOptions  options,
IAuthorizeDataPortal  authorizer,
InterceptorManager  interceptors,
IObjectFactoryLoader  factoryLoader,
IDataPortalActivator  activator,
IDataPortalExceptionInspector  exceptionInspector,
DataPortalExceptionHandler  exceptionHandler 
)

Creates an instance of the type.

Parameters
applicationContext
dashboard
options
activator
authorizer
exceptionInspector
factoryLoader
interceptors
exceptionHandler

Definition at line 54 of file DataPortal.cs.

Member Function Documentation

◆ Create()

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

Create a new business object.

Parameters
objectTypeType of business object to create.
criteriaCriteria object describing business object.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 117 of file DataPortal.cs.

◆ Delete()

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

Delete a business object.

Parameters
objectTypeType of business object to create.
criteriaCriteria object describing business object.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 441 of file DataPortal.cs.

◆ Fetch()

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

Get an existing business object.

Parameters
objectTypeType of business object to retrieve.
criteriaCriteria object describing business object.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 214 of file DataPortal.cs.

◆ GetCriteriaArray()

static object[] Csla.Server.DataPortal.GetCriteriaArray ( object  criteria)
static

Converts a single serializable criteria value into an array of type object.

Parameters
criteriaSingle serializble criteria value
Returns

Definition at line 681 of file DataPortal.cs.

◆ GetCriteriaFromArray()

static object Csla.Server.DataPortal.GetCriteriaFromArray ( params object[]  criteria)
static

Converts a params array to a single serializable criteria value.

Parameters
criteriaParams array
Returns

Definition at line 656 of file DataPortal.cs.

◆ Update()

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

Update a business object.

Parameters
objBusiness object to update.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 308 of file DataPortal.cs.