Class FluentMappingBuilder
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
MappingSchemaMapping schema.
Properties
MappingSchema
Gets builder's mapping schema.
public MappingSchema MappingSchema { get; }
Property Value
Methods
Build()
Adds configured mappings to builder's mapping schema.
public FluentMappingBuilder Build()
Returns
Entity<T>(string?)
Creates entity builder for specified mapping type.
public EntityMappingBuilder<T> Entity<T>(string? configuration = null)
Parameters
configuration
stringOptional 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
LambdaExpressionTarget member, specified using lambda expression.
attribute
MappingAttributeMapping 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
MemberInfoTarget member.
attribute
MappingAttributeMapping 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
TypeTarget type.
attribute
MappingAttributeMapping 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
MappingAttributeMapping 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
MappingAttributeMapping attribute to add to specified member.
Returns
- FluentMappingBuilder
Returns current fluent mapping builder.
Type Parameters
T
Type of labmda expression parameter.