Class JoinAttribute<TEvent>
- Namespace
- Cratis.Chronicle.Projections.ModelBound
- Assembly
- Cratis.Chronicle.dll
Attribute used to indicate that a property should be populated through a join with an event.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = true)]
public sealed class JoinAttribute<TEvent> : Attribute, IProjectionAnnotation, IJoinAttribute, IEventBoundAttribute, ICanMapToEventProperty
Type Parameters
TEventThe type of event to join with.
- Inheritance
-
JoinAttribute<TEvent>
- Implements
- Inherited Members
Constructors
JoinAttribute(string?, string?)
Attribute used to indicate that a property should be populated through a join with an event.
public JoinAttribute(string? on = null, string? eventPropertyName = null)
Parameters
onstringOptional property name on the model to join on. If not specified for root projections, must be specified.
eventPropertyNamestringOptional name of the property on the event. If not specified, uses the model property name.
Properties
EventPropertyName
Gets the name of the property on the event.
public string? EventPropertyName { get; }
Property Value
EventType
Gets the type of event this attribute is bound to.
public Type EventType { get; }
Property Value
On
Gets the property name on the model to join on.
public string? On { get; }