Table of Contents

Class Convert<TFrom, TTo>

Namespace
LinqToDB.Common
Assembly
linq2db.dll

Converters provider for value conversion from TFrom to TTo type.

public static class Convert<TFrom, TTo>

Type Parameters

TFrom

Source conversion type.

TTo

Target conversion type.

Inheritance
Convert<TFrom, TTo>

Properties

Expression

Gets or sets an expression that converts a value of TFrom type to TTo type. Setter updates both expression and delegate forms of converter. Assigning null value will reset converter to default conversion logic. Assigning non-null value will also set converter as default converter.

public static Expression<Func<TFrom, TTo>> Expression { get; set; }

Property Value

Expression<Func<TFrom, TTo>>

From

Gets conversion function delegate.

public static Func<TFrom, TTo> From { get; }

Property Value

Func<TFrom, TTo>

Lambda

Gets or sets a function that converts a value of TFrom type to TTo type. Setter updates both expression and delegate forms of converter. Assigning null value will reset converter to default conversion logic. Assigning non-null value will also set converter as default converter.

public static Func<TFrom, TTo> Lambda { get; set; }

Property Value

Func<TFrom, TTo>