Table of Contents

Interface IBusinessRule

Namespace
Compendium.Core.Domain.Rules
Assembly
Compendium.Core.dll

Represents a business rule that can be validated within the domain. Business rules encapsulate domain logic and invariants that must be maintained.

public interface IBusinessRule

Properties

ErrorCode

Gets the error code that uniquely identifies the type of business rule violation.

string ErrorCode { get; }

Property Value

string

Message

Gets the error message that describes why the business rule is broken.

string Message { get; }

Property Value

string

Methods

IsBroken()

Determines whether the business rule is broken.

bool IsBroken()

Returns

bool

true if the business rule is broken; otherwise, false.