Table of Contents

Class TrellisScalarConverter<TModel, TProvider>

Namespace
Trellis.EntityFrameworkCore
Assembly
Trellis.EntityFrameworkCore.dll

Value converter for Trellis IScalarValue<TSelf, TPrimitive> types.

Converts to database using the Value property and from database using the type's validation factory methods. Invalid persisted values throw TrellisPersistenceMappingException with explicit materialization details.

public class TrellisScalarConverter<TModel, TProvider> : ValueConverter<TModel, TProvider> where TModel : class

Type Parameters

TModel

The Trellis value object type (e.g., EmailAddress).

TProvider

The database provider type (e.g., string).

Inheritance
ValueConverter<TModel, TProvider>
TrellisScalarConverter<TModel, TProvider>
Inherited Members
Extension Methods

Constructors

TrellisScalarConverter()

Initializes a new instance of the TrellisScalarConverter<TModel, TProvider> class.

public TrellisScalarConverter()