Interface IPropertyValueConverter
Converts a mapped property's value between its CLR model type and the representation stored by the
provider. A converter is attached to a property with ValueConverterAttribute or with
the fluent HasConversion(IPropertyValueConverter) mapping, and
is applied on both the read and the write path. The name avoids the System.Windows.Data
IValueConverter collision.
public interface IPropertyValueConverter
- Extension Methods
Properties
ConvertsNulls
Whether a SQL NULL is passed through the converter instead of being mapped to a
null model value. The policy lives on the converter instance so there is a
single source of truth.
bool ConvertsNulls { get; }
Property Value
ProviderType
The provider-side type produced by ConvertToProvider(object?) and consumed by ConvertFromProvider(object?). The reader uses it to select the typed accessor and the write path uses it to type the bound parameter.
Type ProviderType { get; }
Property Value
Methods
ConvertFromProvider(object?)
Converts a provider value read from the database back to the model representation.
object? ConvertFromProvider(object? provider)
Parameters
Returns
- object
The model value.
ConvertToProvider(object?)
Converts a model value to the representation written to the database.
object? ConvertToProvider(object? model)
Parameters
Returns
- object
The provider value.