Table of Contents

Class DomainBuilderRulesExtensions

Namespace
JD.Domain.Rules
Assembly
JD.Domain.Rules.dll

Extension methods for adding rules to the domain builder.

public static class DomainBuilderRulesExtensions
Inheritance
DomainBuilderRulesExtensions
Inherited Members

Methods

Rules<T>(DomainBuilder, Action<RuleSetBuilder<T>>)

Adds a rule set for the specified entity type.

public static DomainBuilder Rules<T>(this DomainBuilder builder, Action<RuleSetBuilder<T>> configure) where T : class

Parameters

builder DomainBuilder

The domain builder.

configure Action<RuleSetBuilder<T>>

The rule configuration action.

Returns

DomainBuilder

The domain builder for chaining.

Type Parameters

T

The entity type.

Rules<T>(DomainBuilder, string, Action<RuleSetBuilder<T>>)

Adds a named rule set for the specified entity type.

public static DomainBuilder Rules<T>(this DomainBuilder builder, string name, Action<RuleSetBuilder<T>> configure) where T : class

Parameters

builder DomainBuilder

The domain builder.

name string

The name of the rule set (e.g., "Create", "Update").

configure Action<RuleSetBuilder<T>>

The rule configuration action.

Returns

DomainBuilder

The domain builder for chaining.

Type Parameters

T

The entity type.