@@ -237,34 +237,34 @@ to use in EF, create ValueConverter and bind it.
237
237
``` csharp
238
238
public class UlidToBytesConverter : ValueConverter <Ulid , byte []>
239
239
{
240
- private static readonly ConverterMappingHints defaultHints = new ConverterMappingHints (size : 16 );
240
+ private static readonly ConverterMappingHints DefaultHints = new ConverterMappingHints (size : 16 );
241
241
242
242
public UlidToBytesConverter () : this (null )
243
243
{
244
244
}
245
-
246
- public UlidToBytesConverter (ConverterMappingHints mappingHints = null )
245
+
246
+ public UlidToBytesConverter (ConverterMappingHints ? mappingHints )
247
247
: base (
248
248
convertToProviderExpression : x => x .ToByteArray (),
249
249
convertFromProviderExpression : x => new Ulid (x ),
250
- mappingHints : defaultHints .With (mappingHints ))
250
+ mappingHints : DefaultHints .With (mappingHints ))
251
251
{
252
252
}
253
253
}
254
254
255
255
public class UlidToStringConverter : ValueConverter <Ulid , string >
256
256
{
257
- private static readonly ConverterMappingHints defaultHints = new ConverterMappingHints (size : 26 );
257
+ private static readonly ConverterMappingHints DefaultHints = new ConverterMappingHints (size : 26 );
258
258
259
259
public UlidToStringConverter () : this (null )
260
260
{
261
261
}
262
262
263
- public UlidToStringConverter (ConverterMappingHints mappingHints = null )
263
+ public UlidToStringConverter (ConverterMappingHints ? mappingHints )
264
264
: base (
265
265
convertToProviderExpression : x => x .ToString (),
266
266
convertFromProviderExpression : x => Ulid .Parse (x ),
267
- mappingHints : defaultHints .With (mappingHints ))
267
+ mappingHints : DefaultHints .With (mappingHints ))
268
268
{
269
269
}
270
270
}
0 commit comments