LinqConnect Documentation
In This Topic
    ComplexConfiguration and ComplexConfiguration<TClass> Classes
    In This Topic

    ComplexConfiguration and ComplexConfiguration<TClass> instances are created or retrieved by the ComplexType methods of the FluentMappingBuilder class. These classes are intended to define mapping of the properties, belonging to a complex type, instead of setting this mapping for all entities, having a property of this complex type.

    The example below demonstrates defining mapping for some properties of the complex type:

    builder.ComplexType<AddressType>()
        .Property(p => p.Country)
            .ColumnName(@"COUNTRY")
            .NotNullable()
            .MaxLength(100)
            .NonUnicode()
            .VariableLength();
     
    builder.ComplexType<AddressType>()
        .Property(p => p.City)
            .ColumnName(@"CITY")
            .NotNullable()
            .ServerDataType(@"VARCHAR2(100) NOT NULL");

    For more detains on defining the association mapping see the Association Configuration Classes topic.