LinqConnect Documentation
In This Topic
    Fluent Mapping Overview
    In This Topic

    With fluent mapping Code-First approach, the development of LinqConnect models becomes much more convenient. However fluent mapping allows use of Database-First and Model-First approaches as well. Now LinqConnect users can choose any of the three ways to map entities:

    Setting Up Mapping

    With the fluent mapping the following LinqConnect mapping kinds can be defined:

    Mapping can be set in two ways:

    1. with the FluentMappingBuilder class, which implicitly creates a configuration for each entity or complex type
    2. with explicitely created and adjusted configuration classes

    Mapping can be set for both public and non-public properties and fields.

    For more information on mapping configuration, read the Configurations and Using FluentMappingBuilder Class sections.

    Conventions

    The extensible conventions engine allows using default values instead of setting the complete mapping configuration. The existing default conventions may be disabled completely or customized. For more flexible mapping configuration, user may create and use custom rules of automatic mapping configuring.

    Design-Time Development

    LinqConnect is provided with its own visual model designer - Entity Developer that includes Fluent mapping code generation templates for C# and Visual Basic. These templates support all the fluent mapping features, allowing developers to design LinqConnect model visually using both Database-First and Model-First approaches, and then generate the fluent mapping code for it.

    Limitations

    Current version does not support fluent mapping of stored procedures and functions.