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.
IDataPortal.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="IDataPortal.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Interface defining the members of the data portal type</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Linq;
11using System.Text;
12using System.Threading.Tasks;
13
14namespace Csla
15{
20 public interface IDataPortal<T>
21 {
29 Task<T> CreateAsync(params object[] criteria);
37 Task<T> FetchAsync(params object[] criteria);
43 Task<T> UpdateAsync(T obj);
49 Task<T> ExecuteAsync(T command);
55 Task DeleteAsync(params object[] criteria);
63 T Create(params object[] criteria);
70 T Fetch(params object[] criteria);
91 T Execute(T obj);
104 T Update(T obj);
110 void Delete(params object[] criteria);
134 [Obsolete]
135 event EventHandler<DataPortalResult<T>> CreateCompleted;
141 [Obsolete]
149 [Obsolete]
150 void BeginCreate(object criteria);
158 [Obsolete]
159 void BeginCreate(object criteria, object userState);
178 [Obsolete]
179 event EventHandler<DataPortalResult<T>> FetchCompleted;
185 [Obsolete]
193 [Obsolete]
194 void BeginFetch(object criteria);
202 [Obsolete]
203 void BeginFetch(object criteria, object userState);
222 [Obsolete]
223 event EventHandler<DataPortalResult<T>> UpdateCompleted;
229 [Obsolete]
230 void BeginUpdate(T obj);
237 [Obsolete]
238 void BeginUpdate(T obj, object userState);
257 [Obsolete]
258 event EventHandler<DataPortalResult<T>> DeleteCompleted;
264 [Obsolete]
265 void BeginDelete(object criteria);
272 [Obsolete]
273 void BeginDelete(object criteria, object userState);
277 [Obsolete]
278 event EventHandler<DataPortalResult<T>> ExecuteCompleted;
284 [Obsolete]
285 void BeginExecute(T command);
292 [Obsolete]
293 void BeginExecute(T command, object userState);
294 }
295}
Dictionary type that is serializable with the SerializationFormatterFactory.GetFormatter().
Interface defining the members of the data portal type.
Definition: IDataPortal.cs:21
EventHandler< DataPortalResult< T > > CreateCompleted
Event raised when the operation has completed.
Definition: IDataPortal.cs:135
void BeginCreate()
Called by a factory method in a business class or by the UI to create a new object,...
Task DeleteAsync(params object[] criteria)
Called by a factory method in a business class or by the UI to delete an object.
Task< T > UpdateAsync(T obj)
Called by a factory method in a business class or by the UI to update an object.
void BeginDelete(object criteria, object userState)
Called by a factory method in a business class or by the UI to delete an object.
void Delete(params object[] criteria)
Called by a Shared (static in C#) method in the business class to cause immediate deletion of a speci...
void BeginUpdate(T obj, object userState)
Called by a factory method in a business class or by the UI to update an object.
void BeginCreate(object criteria, object userState)
Called by a factory method in a business class or by the UI to create a new object,...
T Execute(T obj)
Called to execute a Command object on the server.
T Update(T obj)
Called by the business object's Save() method to insert, update or delete an object in the database.
EventHandler< DataPortalResult< T > > FetchCompleted
Event raised when the operation has completed.
Definition: IDataPortal.cs:179
void BeginExecute(T command)
Called by a factory method in a business class or by the UI to execute a command object.
Task< T > FetchAsync(params object[] criteria)
Starts an asynchronous data portal operation to create a business object.
void BeginFetch()
Called by a factory method in a business class or by the UI to retrieve an existing object,...
void BeginFetch(object criteria, object userState)
Called by a factory method in a business class or by the UI to retrieve an existing object,...
Task< T > ExecuteAsync(T command)
Called by a factory method in a business class or by the UI to execute a command object.
void BeginFetch(object criteria)
Called by a factory method in a business class or by the UI to retrieve an existing object,...
Csla.Core.ContextDictionary GlobalContext
Gets a reference to the global context returned from the background thread and/or server.
Definition: IDataPortal.cs:115
void BeginExecute(T command, object userState)
Called by a factory method in a business class or by the UI to execute a command object.
void BeginUpdate(T obj)
Called by a factory method in a business class or by the UI to update an object.
T Fetch(params object[] criteria)
Called by a factory method in a business class to retrieve an object, which is loaded with values fro...
void BeginDelete(object criteria)
Called by a factory method in a business class or by the UI to delete an object.
EventHandler< DataPortalResult< T > > DeleteCompleted
Event raised when the operation has completed.
Definition: IDataPortal.cs:258
Task< T > CreateAsync(params object[] criteria)
Starts an asynchronous data portal operation to create a business object.
T Create(params object[] criteria)
Called by a factory method in a business class to create a new object, which is loaded with default v...
void BeginCreate(object criteria)
Called by a factory method in a business class or by the UI to create a new object,...
EventHandler< DataPortalResult< T > > ExecuteCompleted
Event indicating an execute operation is complete.
Definition: IDataPortal.cs:278
EventHandler< DataPortalResult< T > > UpdateCompleted
Event raised when the operation has completed.
Definition: IDataPortal.cs:223