Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

AggregateBase<TReadOnlySelf,TWritableSelf,TState>

API reference for AggregateBase<TReadOnlySelf,TWritableSelf,TState> in Vendr, the eCommerce solution for Umbraco v8+

AggregateBase<TReadOnlySelf,TWritableSelf,TState>

The base class of an aggregate entity

public abstract class AggregateBase<TReadOnlySelf, TWritableSelf, TState> : EntityBase<TState>
    where TReadOnlySelf : AggregateBase
    where TWritableSelf : TReadOnlySelf
    where TState : AggregateStateBase

Inheritance

Namespace

Parameters

Parameter Description
TReadOnlySelf
The Type of the read only aggregate entity
TWritableSelf
The Type of the writable aggregate entity
TState
The Type of the shared state of the aggregate entities

Properties

IsNew

Gets a boolean flag to indicate whether the entity is new and therefore has not yet been persisted to the database

public bool IsNew { get; }

Methods

AsReadOnly

Converts the entity into it's read only counterpart

public virtual TReadOnlySelf AsReadOnly()

Returns

The read only entity


AsWritable

Converts the entity into it's writable counterpart

public virtual TWritableSelf AsWritable(IUnitOfWork uow)

Parameters

Parameter Description
uow
An active IUnitOfWork to use for write operations

Returns

The writable entity

Edit this page on GitHub

Site + logo design © 2025 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.