3using System.Collections.Generic;
6using System.Threading.Tasks;
24 public async Task<byte[]>
Create(
string objectTypeName,
byte[] criteriaData,
byte[] contextData)
33 result = await portal.Create(objectType, criteria, context,
false);
39 var response = GetDataPortalResult(result);
52 public async Task<byte[]>
Fetch(
string objectTypeName,
byte[] criteriaData,
byte[] contextData)
61 result = await portal.Fetch(objectType, criteria, context,
false);
67 var response = GetDataPortalResult(result);
79 public async Task<byte[]>
Update(
byte[] objectData,
byte[] contextData)
87 result = await portal.Update(obj, context,
false);
93 var response = GetDataPortalResult(result);
106 public async Task<byte[]>
Delete(
string objectTypeName,
byte[] criteriaData,
byte[] contextData)
115 result = await portal.Delete(objectType, criteria, context,
false);
121 var response = GetDataPortalResult(result);
129 if (dataportalResult.
Error !=
null)
130 result.ErrorData =
new HttpChannel.HttpErrorInfo(dataportalResult.
Error);
Provides consistent context information between the client and server DataPortal objects.
Implements the server-side DataPortal message router as discussed in Chapter 4.
Returns data from the server-side DataPortal to the client-side DataPortal.
object ReturnObject
The business object being returned from the server.
ContextDictionary GlobalContext
The global context being returned from the server.
Exception Error
Error that occurred during the DataPotal call.
Data portal to be invoked by the brokered data portal proxy/host implementation.
async Task< byte[]> Create(string objectTypeName, byte[] criteriaData, byte[] contextData)
Create and initialize a business object.
async Task< byte[]> Fetch(string objectTypeName, byte[] criteriaData, byte[] contextData)
Get an existing business object.
async Task< byte[]> Update(byte[] objectData, byte[] contextData)
Update a business object.
async Task< byte[]> Delete(string objectTypeName, byte[] criteriaData, byte[] contextData)
Delete a business object.