Class RemovedWithJoinAttribute<TEvent>
- Namespace
- Cratis.Chronicle.Projections.ModelBound
- Assembly
- Cratis.Chronicle.dll
Attribute used to indicate what event removes a read model or a child from a collection through a join. When used on a class, it indicates the event that removes the read model instance through a join. When used on a property or parameter, it indicates the event that removes a child from a collection through a join.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = true)]
public sealed class RemovedWithJoinAttribute<TEvent> : Attribute, IProjectionAnnotation, IRemovedWithJoinAttribute, IKeyedAttribute, IEventBoundAttribute
Type Parameters
TEventThe type of event that removes the child.
- Inheritance
-
RemovedWithJoinAttribute<TEvent>
- Implements
- Inherited Members
Constructors
RemovedWithJoinAttribute(string?)
Attribute used to indicate what event removes a read model or a child from a collection through a join. When used on a class, it indicates the event that removes the read model instance through a join. When used on a property or parameter, it indicates the event that removes a child from a collection through a join.
public RemovedWithJoinAttribute(string? key = null)
Parameters
keystringOptional property name on the event that identifies the instance to remove. Defaults to WellKnownExpressions.EventSourceId.
Properties
EventType
Gets the type of event this attribute is bound to.
public Type EventType { get; }
Property Value
Key
Gets the property name on the event that identifies the instance to remove.
public string Key { get; }