Skip to content

projection class

Duncan Jones edited this page Jun 7, 2019 · 3 revisions

Projection Class

The projection class runs a [projection] over the event stream identified by the domain, entity type and _unique identifier- of the entity.

Constructor

public Projection(ProjectionAttribute attribute,
                  string connectionStringName = "")
  • connectionStringName (Optional) The name of the connection string setting to use to connect to the data source that holds the event stream over which to run the projection.

Methods

Process

 public async Task<TProjection> Process<TProjection>(Nullable<DateTime> asOfDate = null) where TProjection : IProjection, new()

This runs the projection over the [events] in the given event stream and returns the resulting projection record.

  • asOfDate (Optional) The date up until which to run the projection. This allows you to return point-in-time values for the projection.

Creating a projection to run

The easiest way to create a new projection to run is to start by creating a class that inherits from the ProjectionBase class

Clone this wiki locally