Table of Contents

Class FluentMappingBuilder

Namespace
LinqToDB.Mapping
Assembly
linq2db.dll

Fluent mapping builder.

public class FluentMappingBuilder
Inheritance
FluentMappingBuilder
Extension Methods

Constructors

FluentMappingBuilder()

Creates new MappingSchema and fluent mapping builder for it.

public FluentMappingBuilder()

FluentMappingBuilder(MappingSchema)

Creates fluent mapping builder for specified mapping schema.

public FluentMappingBuilder(MappingSchema mappingSchema)

Parameters

mappingSchema MappingSchema

Mapping schema.

Properties

MappingSchema

Gets builder's mapping schema.

public MappingSchema MappingSchema { get; }

Property Value

MappingSchema

Methods

Build()

Adds configured mappings to builder's mapping schema.

public FluentMappingBuilder Build()

Returns

FluentMappingBuilder

Entity<T>(string?)

Creates entity builder for specified mapping type.

public EntityMappingBuilder<T> Entity<T>(string? configuration = null)

Parameters

configuration string

Optional mapping schema configuration name, for which this entity builder should be taken into account. ProviderName for standard configuration names.

Returns

EntityMappingBuilder<T>

Returns entity fluent mapping builder.

Type Parameters

T

Mapping type.

HasAttribute(LambdaExpression, MappingAttribute)

Adds mapping attribute to a member, specified using lambda expression.

public FluentMappingBuilder HasAttribute(LambdaExpression func, MappingAttribute attribute)

Parameters

func LambdaExpression

Target member, specified using lambda expression.

attribute MappingAttribute

Mapping attribute to add to specified member.

Returns

FluentMappingBuilder

Returns current fluent mapping builder.

HasAttribute(MemberInfo, MappingAttribute)

Adds mapping attribute to specified member.

public FluentMappingBuilder HasAttribute(MemberInfo memberInfo, MappingAttribute attribute)

Parameters

memberInfo MemberInfo

Target member.

attribute MappingAttribute

Mapping attribute to add to specified member.

Returns

FluentMappingBuilder

Returns current fluent mapping builder.

HasAttribute(Type, MappingAttribute)

Adds mapping attribute to specified type.

public FluentMappingBuilder HasAttribute(Type type, MappingAttribute attribute)

Parameters

type Type

Target type.

attribute MappingAttribute

Mapping attribute to add to specified type.

Returns

FluentMappingBuilder

Returns current fluent mapping builder.

HasAttribute<T>(MappingAttribute)

Adds mapping attribute to specified type.

public FluentMappingBuilder HasAttribute<T>(MappingAttribute attribute)

Parameters

attribute MappingAttribute

Mapping attribute to add to specified type.

Returns

FluentMappingBuilder

Returns current fluent mapping builder.

Type Parameters

T

Target type.

HasAttribute<T>(Expression<Func<T, object?>>, MappingAttribute)

Adds mapping attribute to a member, specified using lambda expression.

public FluentMappingBuilder HasAttribute<T>(Expression<Func<T, object?>> func, MappingAttribute attribute)

Parameters

func Expression<Func<T, object>>

Target member, specified using lambda expression.

attribute MappingAttribute

Mapping attribute to add to specified member.

Returns

FluentMappingBuilder

Returns current fluent mapping builder.

Type Parameters

T

Type of labmda expression parameter.