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.
ServicedDataPortalReadCommitted.cs
Go to the documentation of this file.
1#if !NETSTANDARD2_0 && !NET5_0 && !NET6_0
2//-----------------------------------------------------------------------
3// <copyright file="ServicedDataPortal.cs" company="Marimer LLC">
4// Copyright (c) Marimer LLC. All rights reserved.
5// Website: https://cslanet.com
6// </copyright>
7// <summary>Implements the server-side Serviced </summary>
8//-----------------------------------------------------------------------
9using System;
10using System.EnterpriseServices;
11using System.Runtime.InteropServices;
12using System.Threading.Tasks;
13
14namespace Csla.Server
15{
20 [Transaction(TransactionOption.Required, Isolation = System.EnterpriseServices.TransactionIsolationLevel.ReadCommitted)]
21 [EventTrackingEnabled(true)]
22 [ComVisible(true)]
23 public class ServicedDataPortalReadCommitted : ServicedComponent, IDataPortalServer
24 {
30 {
31 portal = dataPortalBroker;
32 }
33
34 private DataPortalBroker portal { get; set; }
35
53 [AutoComplete(true)]
54 public async Task<DataPortalResult> Create(
55 Type objectType, object criteria, DataPortalContext context, bool isSync)
56 {
57 return await portal.Create(objectType, criteria, context, isSync).ConfigureAwait(false);
58 }
59
74 [AutoComplete(true)]
75 public async Task<DataPortalResult> Fetch(Type objectType, object criteria, DataPortalContext context, bool isSync)
76 {
77 return await portal.Fetch(objectType, criteria, context, isSync).ConfigureAwait(false);
78 }
79
93 [AutoComplete(true)]
94 public async Task<DataPortalResult> Update(object obj, DataPortalContext context, bool isSync)
95 {
96 return await portal.Update(obj, context, isSync).ConfigureAwait(false);
97 }
98
112 [AutoComplete(true)]
113 public async Task<DataPortalResult> Delete(Type objectType, object criteria, DataPortalContext context, bool isSync)
114 {
115 return await portal.Delete(objectType, criteria, context, isSync).ConfigureAwait(false);
116 }
117 }
118}
119#endif
Allows the Data Portal call to be intercepted by a custom IDataPortalServer implementation.
Task< DataPortalResult > Update(object obj, DataPortalContext context, bool isSync)
Update a business object.
Task< DataPortalResult > Create(Type objectType, object criteria, DataPortalContext context, bool isSync)
Create a new business object.
Task< DataPortalResult > Fetch(Type objectType, object criteria, DataPortalContext context, bool isSync)
Get an existing business object.
Task< DataPortalResult > Delete(Type objectType, object criteria, DataPortalContext context, bool isSync)
Delete a business object.
Provides consistent context information between the client and server DataPortal objects.
Implements the server-side Serviced DataPortal described in Chapter 4.
ServicedDataPortalReadCommitted(DataPortalBroker dataPortalBroker)
async Task< DataPortalResult > Fetch(Type objectType, object criteria, DataPortalContext context, bool isSync)
Wraps a Fetch call in a ServicedComponent.
async Task< DataPortalResult > Create(Type objectType, object criteria, DataPortalContext context, bool isSync)
Wraps a Create call in a ServicedComponent.
async Task< DataPortalResult > Delete(Type objectType, object criteria, DataPortalContext context, bool isSync)
Wraps a Delete call in a ServicedComponent.
async Task< DataPortalResult > Update(object obj, DataPortalContext context, bool isSync)
Wraps an Update call in a ServicedComponent.
Interface implemented by server-side data portal components.