Table of Contents

Class DefaultValue

Namespace
LinqToDB.Common
Assembly
linq2db.dll

Default value provider. Default value used for mapping from NULL database value to C# value.

public static class DefaultValue
Inheritance
DefaultValue

Methods

GetValue(Type, MappingSchema?)

Returns default value for provided type.

public static object? GetValue(Type type, MappingSchema? mappingSchema = null)

Parameters

type Type

Type, for which default value requested.

mappingSchema MappingSchema

Optional mapping schema to provide mapping information for enum type.

Returns

object

Default value for specific type.

GetValue<T>()

Returns default value for provided type.

public static T GetValue<T>()

Returns

T

Default value for specific type.

Type Parameters

T

Type, for which default value requested.

SetValue<T>(T)

Sets default value for provided type.

public static void SetValue<T>(T value)

Parameters

value T

Default value for specific type.

Type Parameters

T

Type, for which default value set.