Class BoolToStringConverter
- 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
stringThe string to use for false.
trueValue
stringThe string to use for true.
mappingHints
ConverterMappingHintsHints 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; }