Class MappingSchema
Mapping schema.
Implements
Namespace: LinqToDB.Mapping
Assembly: linq2db.dll
Syntax
public class MappingSchema : object, IConfigurationID
Constructors
| Improve this Doc View SourceMappingSchema()
Creates mapping schema instance.
Declaration
public MappingSchema()
MappingSchema(MappingSchema[])
Creates mapping schema, derived from other mapping schemata.
Declaration
public MappingSchema(params MappingSchema[] schemas)
Parameters
Type | Name | Description |
---|---|---|
MappingSchema[] | schemas | Base mapping schemata. |
MappingSchema(Nullable<String>)
Creates mapping schema for specified configuration name.
Declaration
public MappingSchema(string? configuration)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.String> | configuration | Mapping schema configuration name. ProviderName for standard names. |
Remarks
Schema name should be unique for mapping schemas with different mappings. Using same name could lead to incorrect mapping used when mapping schemas with same name define different mappings for same type.
MappingSchema(Nullable<String>, MappingSchema[])
Creates mapping schema with specified configuration name and base mapping schemas.
Declaration
public MappingSchema(string? configuration, params MappingSchema[] schemas)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.String> | configuration | Mapping schema configuration name. ProviderName for standard names. |
MappingSchema[] | schemas | Base mapping schemas. |
Remarks
Schema name should be unique for mapping schemas with different mappings. Using same name could lead to incorrect mapping used when mapping schemas with same name define different mappings for same type.
Fields
| Improve this Doc View SourceDefault
Default mapping schema, used by LINQ to DB, when more specific mapping schema not provided.
Declaration
public static MappingSchema Default
Field Value
Type | Description |
---|---|
MappingSchema |
Properties
| Improve this Doc View SourceColumnNameComparer
Gets or sets column name comparison rules for comparison of column names in mapping with column name, returned by provider's data reader.
Declaration
public StringComparer ColumnNameComparer { get; set; }
Property Value
Type | Description |
---|---|
StringComparer |
ConfigurationList
Gets configurations, associated with current mapping schema.
Declaration
public string[] ConfigurationList { get; }
Property Value
Type | Description |
---|---|
System.String[] |
DisplayID
Declaration
public string DisplayID { get; }
Property Value
Type | Description |
---|---|
System.String |
EntityDescriptorCreatedCallback
Gets or sets action, called when the EntityDescriptor is created. Could be used to adjust created descriptor before use.
Declaration
public Action<MappingSchema, IEntityChangeDescriptor>? EntityDescriptorCreatedCallback { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Action<MappingSchema, IEntityChangeDescriptor>> |
IsLockable
Declaration
public virtual bool IsLockable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsLocked
Declaration
public virtual bool IsLocked { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MetadataReader
Gets or sets metadata attributes provider for current schema. Metadata providers, shipped with LINQ to DB:
- MetadataReader - aggregation metadata provider over collection of other providers;
- AttributeReader - .NET attributes provider;
- FluentMetadataReader - fluent mappings metadata provider;
- SystemDataLinqAttributeReader - metadata provider that converts
attributes to LINQ to DB mapping attributes; - SystemDataSqlServerAttributeReader - metadata provider that converts
attributes to LINQ to DB mapping attributes; - XmlAttributeReader - XML-based mappings metadata provider.
Declaration
public IMetadataReader MetadataReader { get; set; }
Property Value
Type | Description |
---|---|
IMetadataReader |
ValueToSqlConverter
Gets value to SQL (usually literal) converter.
Declaration
public ValueToSqlConverter ValueToSqlConverter { get; }
Property Value
Type | Description |
---|---|
ValueToSqlConverter |
Methods
| Improve this Doc View SourceAddMetadataReader(IMetadataReader)
Adds additional metadata attributes provider to current schema.
Declaration
public void AddMetadataReader(IMetadataReader reader)
Parameters
Type | Name | Description |
---|---|---|
IMetadataReader | reader | Metadata attributes provider. |
AddScalarType(Type, DataType, Boolean)
Configure provided type mapping to scalar database type.
Declaration
public void AddScalarType(Type type, DataType dataType = default(DataType), bool withNullable = true)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type to configure. |
DataType | dataType | Optional scalar data type. |
System.Boolean | withNullable | Also register |
AddScalarType(Type, SqlDataType, Boolean)
Configure provided type mapping to scalar database type.
Declaration
public void AddScalarType(Type type, SqlDataType dataType, bool withNullable = true)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type to configure. |
SqlDataType | dataType | Database data type. |
System.Boolean | withNullable | Also register |
AddScalarType(Type, Nullable<Object>, DataType)
Configure provided type mapping to scalar database type.
Declaration
public void AddScalarType(Type type, object? defaultValue, DataType dataType = default(DataType))
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type to configure. |
System.Nullable<System.Object> | defaultValue | Default value. See |
DataType | dataType | Optional scalar data type. |
AddScalarType(Type, Nullable<Object>, Boolean, DataType)
Configure provided type mapping to scalar database type.
Declaration
public void AddScalarType(Type type, object? defaultValue, bool canBeNull, DataType dataType = default(DataType))
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type to configure. |
System.Nullable<System.Object> | defaultValue | Default value. See |
System.Boolean | canBeNull | Set |
DataType | dataType | Optional scalar data type. |
ChangeType(Nullable<Object>, Type)
Converts value to specified type.
Declaration
public object? ChangeType(object? value, Type conversionType)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | value | Value to convert. |
Type | conversionType | Target type. |
Returns
Type | Description |
---|---|
System.Nullable<System.Object> | Converted value. |
ChangeTypeTo<T>(Nullable<Object>)
Converts value to specified type.
Declaration
public T ChangeTypeTo<T>(object? value)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | value | Value to convert. |
Returns
Type | Description |
---|---|
T | Converted value. |
Type Parameters
Name | Description |
---|---|
T | Target type. |
ClearCache()
Clears EntityDescriptor cache.
Declaration
public static void ClearCache()
EnumToValue(Enum)
Converts enum value to database value.
Declaration
public object? EnumToValue(Enum value)
Parameters
Type | Name | Description |
---|---|---|
Enum | value | Enum value. |
Returns
Type | Description |
---|---|
System.Nullable<System.Object> | Database value. |
GenerateConvertedValueExpression(Nullable<Object>, Type)
Declaration
public Expression GenerateConvertedValueExpression(object? value, Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | value | |
Type | type |
Returns
Type | Description |
---|---|
Expression |
GenerateID()
Declaration
protected virtual int GenerateID()
Returns
Type | Description |
---|---|
System.Int32 |
GenerateSafeConvert(Type, Type)
Declaration
public LambdaExpression GenerateSafeConvert(Type fromType, Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | fromType | |
Type | type |
Returns
Type | Description |
---|---|
LambdaExpression |
GetAttribute<T>(Type, Func<T, Nullable<String>>, Boolean)
Gets attribute of specified type, associated with specified type. Attributes filtered by schema's configuration names (see ConfigurationList).
Declaration
public T GetAttribute<T>(Type type, Func<T, string?> configGetter, bool inherit = true)
where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | Attribute owner type. |
Func<T, System.Nullable<System.String>> | configGetter | Attribute configuration name provider. |
System.Boolean | inherit | If |
Returns
Type | Description |
---|---|
T | First found attribute of specified type or |
Type Parameters
Name | Description |
---|---|
T | Attribute type. |
GetAttribute<T>(Type, MemberInfo, Func<T, Nullable<String>>, Boolean)
Gets attribute of specified type, associated with specified type member. Attributes filtered by schema's configuration names (see ConfigurationList).
Declaration
public T GetAttribute<T>(Type type, MemberInfo memberInfo, Func<T, string?> configGetter, bool inherit = true)
where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | Member's owner type. |
MemberInfo | memberInfo | Attribute owner member. |
Func<T, System.Nullable<System.String>> | configGetter | Attribute configuration name provider. |
System.Boolean | inherit | If |
Returns
Type | Description |
---|---|
T | First found attribute of specified type or |
Type Parameters
Name | Description |
---|---|
T | Attribute type. |
GetAttribute<T>(Type, MemberInfo, Boolean)
Gets attribute of specified type, associated with specified type member.
Declaration
public T GetAttribute<T>(Type type, MemberInfo memberInfo, bool inherit = true)
where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | Member's owner type. |
MemberInfo | memberInfo | Attribute owner member. |
System.Boolean | inherit | If |
Returns
Type | Description |
---|---|
T | First found attribute of specified type or |
Type Parameters
Name | Description |
---|---|
T | Attribute type. |
GetAttribute<T>(Type, Boolean)
Gets attribute of specified type, associated with specified type.
Declaration
public T GetAttribute<T>(Type type, bool inherit = true)
where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | Attribute owner type. |
System.Boolean | inherit | If |
Returns
Type | Description |
---|---|
T | First found attribute of specified type or |
Type Parameters
Name | Description |
---|---|
T | Attribute type. |
GetAttributes<T>(Type, Func<T, Nullable<String>>, Boolean, Boolean)
Gets attributes of specified type, associated with specified type. Attributes filtered by schema's configuration names (see ConfigurationList).
Declaration
public T[] GetAttributes<T>(Type type, Func<T, string?> configGetter, bool inherit = true, bool exactForConfiguration = false)
where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | Attributes owner type. |
Func<T, System.Nullable<System.String>> | configGetter | Attribute configuration name provider. |
System.Boolean | inherit | If |
System.Boolean | exactForConfiguration | If |
Returns
Type | Description |
---|---|
T[] | Attributes of specified type. |
Type Parameters
Name | Description |
---|---|
T | Attribute type. |
GetAttributes<T>(Type, MemberInfo, Func<T, Nullable<String>>, Boolean, Boolean)
Gets attributes of specified type, associated with specified type member. Attributes filtered by schema's configuration names (see ConfigurationList).
Declaration
public T[] GetAttributes<T>(Type type, MemberInfo memberInfo, Func<T, string?> configGetter, bool inherit = true, bool exactForConfiguration = false)
where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | Member's owner type. |
MemberInfo | memberInfo | Attributes owner member. |
Func<T, System.Nullable<System.String>> | configGetter | Attribute configuration name provider. |
System.Boolean | inherit | If |
System.Boolean | exactForConfiguration | If |
Returns
Type | Description |
---|---|
T[] | Attributes of specified type. |
Type Parameters
Name | Description |
---|---|
T | Attribute type. |
GetAttributes<T>(Type, MemberInfo, Boolean)
Gets attributes of specified type, associated with specified type member.
Declaration
public T[] GetAttributes<T>(Type type, MemberInfo memberInfo, bool inherit = true)
where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | Member's owner type. |
MemberInfo | memberInfo | Attributes owner member. |
System.Boolean | inherit | If |
Returns
Type | Description |
---|---|
T[] | Attributes of specified type. |
Type Parameters
Name | Description |
---|---|
T | Attribute type. |
GetAttributes<T>(Type, Boolean)
Gets attributes of specified type, associated with specified type.
Declaration
public T[] GetAttributes<T>(Type type, bool inherit = true)
where T : Attribute
Parameters
Type | Name | Description |
---|---|---|
Type | type | Attributes owner type. |
System.Boolean | inherit | If |
Returns
Type | Description |
---|---|
T[] | Attributes of specified type. |
Type Parameters
Name | Description |
---|---|
T | Attribute type. |
GetCanBeNull(Type)
Returns true
, if value of specified type could contain null
.
Declaration
public bool GetCanBeNull(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Value type. |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
GetConverter<TFrom, TTo>()
Returns conversion delegate for conversion from TFrom
type to TTo
type.
Declaration
public Func<TFrom, TTo>? GetConverter<TFrom, TTo>()
Returns
Type | Description |
---|---|
System.Nullable<Func<TFrom, TTo>> | Conversion delegate or |
Type Parameters
Name | Description |
---|---|
TFrom | Source type. |
TTo | Target type. |
GetConvertExpression(DbDataType, DbDataType, Boolean, Boolean)
Returns conversion expression from from
type to to
type.
Declaration
public LambdaExpression? GetConvertExpression(DbDataType from, DbDataType to, bool checkNull = true, bool createDefault = true)
Parameters
Type | Name | Description |
---|---|---|
DbDataType | from | Source type. |
DbDataType | to | Target type. |
System.Boolean | checkNull | If |
System.Boolean | createDefault | Create new conversion expression, if conversion is not defined. |
Returns
Type | Description |
---|---|
System.Nullable<LambdaExpression> | Conversion expression or |
GetConvertExpression(Type, Type, Boolean, Boolean)
Returns conversion expression from from
type to to
type.
Declaration
public LambdaExpression? GetConvertExpression(Type from, Type to, bool checkNull = true, bool createDefault = true)
Parameters
Type | Name | Description |
---|---|---|
Type | from | Source type. |
Type | to | Target type. |
System.Boolean | checkNull | If |
System.Boolean | createDefault | Create new conversion expression, if conversion is not defined. |
Returns
Type | Description |
---|---|
System.Nullable<LambdaExpression> | Conversion expression or |
GetConvertExpression<TFrom, TTo>(Boolean, Boolean)
Returns conversion expression from TFrom
type to TTo
type.
Declaration
public Expression<Func<TFrom, TTo>>? GetConvertExpression<TFrom, TTo>(bool checkNull = true, bool createDefault = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | checkNull | If |
System.Boolean | createDefault | Create new conversion expression, if conversion is not defined. |
Returns
Type | Description |
---|---|
System.Nullable<Expression<Func<TFrom, TTo>>> | Conversion expression or |
Type Parameters
Name | Description |
---|---|
TFrom | Source type. |
TTo | Target type. |
GetDataType(Type)
Returns database type mapping information for specified type.
Declaration
public SqlDataType GetDataType(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Mapped type. |
Returns
Type | Description |
---|---|
SqlDataType | Database type information. |
GetDefaultFromEnumType(Type)
Returns type, to which provided enumeration type is mapped or null
, if type is not configured.
See SetDefaultFromEnumType(Type, Type).
Declaration
public Type? GetDefaultFromEnumType(Type enumType)
Parameters
Type | Name | Description |
---|---|---|
Type | enumType | Enumeration type. |
Returns
Type | Description |
---|---|
System.Nullable<Type> | Mapped type or |
GetDefaultValue(Type)
Returns default value for specified type.
Default value is a value, used instead of NULL
value, read from database.
Declaration
public object? GetDefaultValue(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Value type. |
Returns
Type | Description |
---|---|
System.Nullable<System.Object> | Returns default value for type. |
GetDefinedTypes()
Enumerates types registered by FluentMetadataBuilder.
Declaration
public Type[] GetDefinedTypes()
Returns
Type | Description |
---|---|
Type[] | Returns array with all types, mapped by fluent mappings. |
GetDynamicColumns(Type)
Gets the dynamic columns defined on given type.
Declaration
public MemberInfo[] GetDynamicColumns(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type. |
Returns
Type | Description |
---|---|
MemberInfo[] | All dynamic columns defined on given type. |
GetEntityDescriptor(Type)
Returns mapped entity descriptor.
Declaration
public EntityDescriptor GetEntityDescriptor(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Mapped type. |
Returns
Type | Description |
---|---|
EntityDescriptor | Mapping descriptor. |
GetFluentMappingBuilder()
Gets fluent mapping builder for current schema.
Declaration
public FluentMappingBuilder GetFluentMappingBuilder()
Returns
Type | Description |
---|---|
FluentMappingBuilder | Fluent mapping builder. |
GetMapValues(Type)
Returns enum type mapping information or null
for non-enum types.
Declaration
public virtual MapValue[] GetMapValues(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Mapped type. |
Returns
Type | Description |
---|---|
MapValue[] | Mapping values for enum type and |
GetUnderlyingDataType(Type, out Boolean)
Returns scalar database type mapping information for provided type.
Declaration
public SqlDataType GetUnderlyingDataType(Type type, out bool canBeNull)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Mapped type. |
System.Boolean | canBeNull | Returns |
Returns
Type | Description |
---|---|
SqlDataType | Scalar database type information. |
InitGenericConvertProvider(Type[])
Initialize generic conversions for specific type parameters.
Declaration
public bool InitGenericConvertProvider(params Type[] types)
Parameters
Type | Name | Description |
---|---|---|
Type[] | types | Generic type parameters. |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
InitGenericConvertProvider<T>()
Initialize generic conversions for specific type parameter.
Declaration
public void InitGenericConvertProvider<T>()
Type Parameters
Name | Description |
---|---|
T | Generic type parameter, for which converters should be initialized. |
IsScalarType(Type)
Returns true
, if provided type mapped to scalar database type in current schema.
Declaration
public bool IsScalarType(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type to check. |
Returns
Type | Description |
---|---|
System.Boolean |
|
SetCanBeNull(Type, Boolean)
Sets null
value support flag for specified type.
Declaration
public void SetCanBeNull(Type type, bool value)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Value type. |
System.Boolean | value | If |
SetConverter<TFrom, TTo>(Func<TFrom, TTo>)
Specify conversion delegate for conversion from TFrom
type to TTo
type.
Declaration
public void SetConverter<TFrom, TTo>(Func<TFrom, TTo> func)
Parameters
Type | Name | Description |
---|---|---|
Func<TFrom, TTo> | func | Conversion delegate. |
Type Parameters
Name | Description |
---|---|
TFrom | Source type. |
TTo | Target type. |
SetConverter<TFrom, TTo>(Func<TFrom, TTo>, DbDataType, DbDataType)
Specify conversion delegate for conversion from TFrom
type to TTo
type.
Declaration
public void SetConverter<TFrom, TTo>(Func<TFrom, TTo> func, DbDataType from, DbDataType to)
Parameters
Type | Name | Description |
---|---|---|
Func<TFrom, TTo> | func | Conversion delegate. |
DbDataType | from | Source type detalization |
DbDataType | to | Target type detalization |
Type Parameters
Name | Description |
---|---|
TFrom | Source type. |
TTo | Target type. |
SetConvertExpression(DbDataType, DbDataType, LambdaExpression, Boolean)
Specify conversion expression for conversion from fromType
type to toType
type.
Declaration
public void SetConvertExpression(DbDataType fromType, DbDataType toType, LambdaExpression expr, bool addNullCheck = true)
Parameters
Type | Name | Description |
---|---|---|
DbDataType | fromType | Source type. |
DbDataType | toType | Target type. |
LambdaExpression | expr | Conversion expression. |
System.Boolean | addNullCheck | If |
SetConvertExpression(Type, Type, LambdaExpression, Boolean)
Specify conversion expression for conversion from fromType
type to toType
type.
Declaration
public void SetConvertExpression(Type fromType, Type toType, LambdaExpression expr, bool addNullCheck = true)
Parameters
Type | Name | Description |
---|---|---|
Type | fromType | Source type. |
Type | toType | Target type. |
LambdaExpression | expr | Conversion expression. |
System.Boolean | addNullCheck | If |
SetConvertExpression<TFrom, TTo>(Expression<Func<TFrom, TTo>>, Expression<Func<TFrom, TTo>>)
Specify conversion expression for conversion from TFrom
type to TTo
type.
Declaration
public void SetConvertExpression<TFrom, TTo>(Expression<Func<TFrom, TTo>> checkNullExpr, Expression<Func<TFrom, TTo>> expr)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<TFrom, TTo>> | checkNullExpr |
|
Expression<Func<TFrom, TTo>> | expr | Conversion expression. |
Type Parameters
Name | Description |
---|---|
TFrom | Source type. |
TTo | Target type. |
SetConvertExpression<TFrom, TTo>(Expression<Func<TFrom, TTo>>, Boolean)
Specify conversion expression for conversion from TFrom
type to TTo
type.
Declaration
public void SetConvertExpression<TFrom, TTo>(Expression<Func<TFrom, TTo>> expr, bool addNullCheck = true)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<TFrom, TTo>> | expr | Conversion expression. |
System.Boolean | addNullCheck | If |
Type Parameters
Name | Description |
---|---|
TFrom | Source type. |
TTo | Target type. |
SetCultureInfo(CultureInfo)
Set conversion expressions for conversion from and to string
for basic types
(byte
, sbyte
, short
, ushort
, int
, uint
, long
, ulong
, float
, double
, decimal
, DateTime
, DateTimeOffset
)
using provided culture format providers.
Declaration
public void SetCultureInfo(CultureInfo info)
Parameters
Type | Name | Description |
---|---|---|
CultureInfo | info | Culture with format providers for conversions. |
SetDataType(Type, DataType)
Associate specified type with LINQ to DB data type.
Declaration
public void SetDataType(Type type, DataType dataType)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Mapped type. |
DataType | dataType | LINQ to DB data type. |
SetDataType(Type, SqlDataType)
Associate specified type with database data type.
Declaration
public void SetDataType(Type type, SqlDataType dataType)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Mapped type. |
SqlDataType | dataType | Database data type. |
SetDefaultFromEnumType(Type, Type)
Sets type, to which provided enumeration type should be mapped.
Declaration
public void SetDefaultFromEnumType(Type enumType, Type defaultFromType)
Parameters
Type | Name | Description |
---|---|---|
Type | enumType | Enumeration type. |
Type | defaultFromType | Mapped type. |
SetDefaultValue(Type, Nullable<Object>)
Sets default value for specific type.
Default value is a value, used instead of NULL
value, read from database.
Declaration
public void SetDefaultValue(Type type, object? value)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Value type. |
System.Nullable<System.Object> | value | Default value. |
SetGenericConvertProvider(Type)
Adds generic type conversions provider. Type converter must implement IGenericInfoProvider interface. IGenericInfoProvider for more details and examples.
Declaration
public void SetGenericConvertProvider(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Generic type conversions provider. |
SetScalarType(Type, Boolean)
Configure how provided type should be handled during mapping to database - as scalar value or composite type.
Declaration
public void SetScalarType(Type type, bool isScalarType = true)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type to configure. |
System.Boolean | isScalarType |
|
SetValueToSqlConverter(Type, Action<StringBuilder, SqlDataType, DataOptions, Object>)
Sets value to SQL converter action for specific value type.
Declaration
public void SetValueToSqlConverter(Type type, Action<StringBuilder, SqlDataType, DataOptions, object> converter)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Value type. |
Action<StringBuilder, SqlDataType, DataOptions, System.Object> | converter | Converter action. Action accepts three parameters:
|
SetValueToSqlConverter(Type, Action<StringBuilder, SqlDataType, Object>)
Sets value to SQL converter action for specific value type.
Declaration
public void SetValueToSqlConverter(Type type, Action<StringBuilder, SqlDataType, object> converter)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Value type. |
Action<StringBuilder, SqlDataType, System.Object> | converter | Converter action. Action accepts three parameters:
|
TryGetConvertExpression(Type, Type)
Returns custom value conversion expression from from
type to to
type if it
is defined in mapping schema, or null
otherwise.
Declaration
public virtual LambdaExpression? TryGetConvertExpression(Type from, Type to)
Parameters
Type | Name | Description |
---|---|---|
Type | from | Source type. |
Type | to | Target type. |
Returns
Type | Description |
---|---|
System.Nullable<LambdaExpression> | Conversion expression or |
Explicit Interface Implementations
| Improve this Doc View SourceIConfigurationID.ConfigurationID
Unique schema configuration identifier. For internal use only.
Declaration
int IConfigurationID.ConfigurationID { get; }
Returns
Type | Description |
---|---|
System.Int32 |