Table of Contents

Class BoolToStringConverter

Namespace
Microsoft.EntityFrameworkCore.Storage.ValueConversion
Assembly
Microsoft.EntityFrameworkCore.dll

Converts bool values to and from two string values.

public class BoolToStringConverter : BoolToTwoValuesConverter<string>
Inheritance
BoolToStringConverter
Inherited Members

Remarks

See EF Core value converters for more information and examples.

Constructors

BoolToStringConverter(string, string, ConverterMappingHints?)

Creates a new instance of this converter. A case-insensitive first character test is used when converting from the store.

public BoolToStringConverter(string falseValue, string trueValue, ConverterMappingHints? mappingHints = null)

Parameters

falseValue string

The string to use for false.

trueValue string

The string to use for true.

mappingHints ConverterMappingHints

Hints that can be used by the ITypeMappingSource to create data types with appropriate facets for the converted data.

Remarks

See EF Core value converters for more information and examples.

Properties

DefaultInfo

A ValueConverterInfo for the default use of this converter.

public static ValueConverterInfo DefaultInfo { get; }

Property Value

ValueConverterInfo