Enum ReadModelForCommandOwnership

Namespace
Cratis.Arc.Queries
Assembly
Cratis.Arc.Core.dll

Represents how strongly an ICanResolveReadModelForCommand claims the read model types it reports.

public enum ReadModelForCommandOwnership
Extension Methods

Fields

Declared = 0

An artifact in the application says the provider owns the read model: a Chronicle projection or reducer targeting it, or a DbSet carrying it on a read model DbContext. A declaring provider claims the type even when something else already resolves it.

Fallback = 1

The provider can resolve any read model it reports — its store simply holds a document per read model — but nothing in the application says it owns them. It claims only the read model types nothing else already resolves, leaving both a declaring provider and the application's own registration untouched.

Remarks

More than one provider can be able to resolve the same read model type, and the application does not control the order its providers are registered in. The ownership a provider declares — rather than that order — decides which one resolves the type.