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.
Server/DataPortalResult.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="DataPortalResult.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Returns data from the server-side DataPortal to the </summary>
7//-----------------------------------------------------------------------
8using System;
9using Csla.Core;
10
11namespace Csla.Server
12{
19 public class DataPortalResult : EventArgs, Core.IUseApplicationContext
20 {
21 internal ApplicationContext ApplicationContext { get; set; }
22 ApplicationContext Core.IUseApplicationContext.ApplicationContext { get => ApplicationContext; set => ApplicationContext = value; }
23
28 public object ReturnObject { get; private set; }
29
34 public Exception Error { get; private set; }
35
40 {
41 }
42
49 public DataPortalResult(ApplicationContext applicationContext, object returnObject)
50 {
51 ApplicationContext = applicationContext;
52 ReturnObject = returnObject;
53 }
54
65 public DataPortalResult(ApplicationContext applicationContext, object returnObject, Exception ex)
66 {
67 ReturnObject = returnObject;
68 Error = ex;
69 }
70 }
71}
Provides consistent context information between the client and server DataPortal objects.
ApplicationContext(ApplicationContextAccessor applicationContextAccessor)
Creates a new instance of the type
Returns data from the server-side DataPortal to the client-side DataPortal.
DataPortalResult()
Creates an instance of the type.
DataPortalResult(ApplicationContext applicationContext, object returnObject, Exception ex)
Creates an instance of the type.
object ReturnObject
The business object being returned from the server.
DataPortalResult(ApplicationContext applicationContext, object returnObject)
Creates an instance of the type.
Exception Error
Error that occurred during the DataPotal call.
Implement if a class requires access to the CSLA ApplicationContext type.
@ Serializable
Prevents updating or inserting until the transaction is complete.