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.
RemotingPortal.cs
Go to the documentation of this file.
1#if !NETFX_CORE
2//-----------------------------------------------------------------------
3// <copyright file="RemotingPortal.cs" company="Marimer LLC">
4// Copyright (c) Marimer LLC. All rights reserved.
5// Website: https://cslanet.com
6// </copyright>
7// <summary>Exposes server-side DataPortal functionality</summary>
8//-----------------------------------------------------------------------
9using System;
10
11namespace Csla.Server.Hosts
12{
17 public class RemotingPortal : MarshalByRefObject//, Server.IDataPortalServer
18 {
28 Type objectType, object criteria, DataPortalContext context)
29 {
30 Server.DataPortal portal = new DataPortal();
31 return portal.Create(objectType, criteria, context, true).Result;
32 }
33
42 public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
43 {
44 Server.DataPortal portal = new DataPortal();
45 return portal.Fetch(objectType, criteria, context, true).Result;
46 }
47
55 public DataPortalResult Update(object obj, DataPortalContext context)
56 {
57 Server.DataPortal portal = new DataPortal();
58 return portal.Update(obj, context, true).Result;
59 }
60
69 public DataPortalResult Delete(Type objectType, object criteria, DataPortalContext context)
70 {
71 Server.DataPortal portal = new DataPortal();
72 return portal.Delete(objectType, criteria, context, true).Result;
73 }
74 }
75}
76#endif
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.
Exposes server-side DataPortal functionality through .NET Remoting.
DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
Get an existing business object.
DataPortalResult Create(Type objectType, object criteria, DataPortalContext context)
Create a new business object.
DataPortalResult Delete(Type objectType, object criteria, DataPortalContext context)
Delete a business object.
DataPortalResult Update(object obj, DataPortalContext context)
Update a business object.