Interface IDataLogic<T>
Data logic interface
Namespace: XData
Assembly: XData.docfx.dll
Syntax
public interface IDataLogic<T>
where T : class, IDataObject
Type Parameters
Name | Description |
---|---|
T |
Remarks
Marking interface for classes contains data aware logic of mapped objects
Used to divide data aware logic from mapping
Hint: Separating mapping and logic to different assemblies allows to run data aware logic on XData application server
Hint: Application can use XData application server or direct connect to database depending of configuration (see IConfiguration)
Examples
public abstract class InvoiceLogic : IDataLogic<Invoice> {
[Action(DataActionType.BeforeClear)]
public readonly static RepositoryTrigger<Invoice> ClearHistoryBatch =
((IRepository<Invoice> invoiceRepository, ref DataTriggerFlag flag) => DoSomething());
[CustomAction("{ab12d6f0-69d0-4997-bb0b-5f5f7c0581d1}")]
public static readonly CustomLogic<Invoice> TestCustomLogic = (objects => { return DoSomethingElse(); });
}