Table of Contents

Class PropertyBuilder<TEntity, TProperty>

Namespace
JD.Domain.Modeling
Assembly
JD.Domain.Modeling.dll

Fluent builder for configuring entity properties.

public sealed class PropertyBuilder<TEntity, TProperty> where TEntity : class

Type Parameters

TEntity

The entity type.

TProperty

The property type.

Inheritance
PropertyBuilder<TEntity, TProperty>
Inherited Members

Methods

HasMaxLength(int)

Sets the maximum length for string properties.

public PropertyBuilder<TEntity, TProperty> HasMaxLength(int maxLength)

Parameters

maxLength int

The maximum length.

Returns

PropertyBuilder<TEntity, TProperty>

The property builder for chaining.

HasPrecision(int, int?)

Sets the precision for numeric properties.

public PropertyBuilder<TEntity, TProperty> HasPrecision(int precision, int? scale = null)

Parameters

precision int

The precision.

scale int?

The optional scale.

Returns

PropertyBuilder<TEntity, TProperty>

The property builder for chaining.

IsComputed()

Marks the property as computed.

public PropertyBuilder<TEntity, TProperty> IsComputed()

Returns

PropertyBuilder<TEntity, TProperty>

The property builder for chaining.

IsConcurrencyToken()

Marks the property as a concurrency token.

public PropertyBuilder<TEntity, TProperty> IsConcurrencyToken()

Returns

PropertyBuilder<TEntity, TProperty>

The property builder for chaining.

IsRequired(bool)

Marks the property as required.

public PropertyBuilder<TEntity, TProperty> IsRequired(bool isRequired = true)

Parameters

isRequired bool

Whether the property is required.

Returns

PropertyBuilder<TEntity, TProperty>

The property builder for chaining.