Table of Contents

Interface IChildrenBuilder<TParentReadModel, TChildReadModel>

Namespace
Cratis.Chronicle.Projections
Assembly
Cratis.Chronicle.dll

Defines the builder for building out a child relationship on a model.

public interface IChildrenBuilder<TParentReadModel, TChildReadModel> : IProjectionBuilder<TChildReadModel, IChildrenBuilder<TParentReadModel, TChildReadModel>>, IChildrenBuilder

Type Parameters

TParentReadModel

Parent read model type.

TChildReadModel

Child read model type.

Inherited Members

Methods

FromEventProperty<TEvent>(Expression<Func<TEvent, TChildReadModel>>)

Defines the event and property on it that the child should be created as a value from.

IChildrenBuilder<TParentReadModel, TChildReadModel> FromEventProperty<TEvent>(Expression<Func<TEvent, TChildReadModel>> propertyExpression)

Parameters

propertyExpression Expression<Func<TEvent, TChildReadModel>>

The expression that represents the property on the event to use.

Returns

IChildrenBuilder<TParentReadModel, TChildReadModel>

Builder continuation.

Type Parameters

TEvent

Type of event.

IdentifiedBy(PropertyPath)

Sets the property that identifies the child read model in the collection within the parent.

IChildrenBuilder<TParentReadModel, TChildReadModel> IdentifiedBy(PropertyPath propertyPath)

Parameters

propertyPath PropertyPath

The Cratis.Chronicle.Properties.PropertyPath that represents the property used to identify.

Returns

IChildrenBuilder<TParentReadModel, TChildReadModel>

Builder continuation.

IdentifiedBy<TProperty>(Expression<Func<TChildReadModel, TProperty>>)

Sets the property that identifies the child read model in the collection within the parent.

IChildrenBuilder<TParentReadModel, TChildReadModel> IdentifiedBy<TProperty>(Expression<Func<TChildReadModel, TProperty>> propertyExpression)

Parameters

propertyExpression Expression<Func<TChildReadModel, TProperty>>

The expression that represents the property used to identify.

Returns

IChildrenBuilder<TParentReadModel, TChildReadModel>

Builder continuation.

Type Parameters

TProperty

Type of property.