LinqConnect Documentation
In This Topic
    Using FluentMappingSource Class
    In This Topic

    This class generates LinqConnect mapping. It is derived from Devart.Data.Linq.Mapping.MappingSource. A FluentMappingSource instance is passed to the DataContext constructor, which takes the MappingSource argument. This class does not have the default constructor and is created by the CreateMappingSource method of the FluentMappingBuilder class.

    Mapping is generated from the data, created and passed by the FluentMappingBuilder class - partial or complete configurations, default and user conventions, ignore lists, and the specified data provider. The process of mapping generation for a partially configured or completely unconfigured model can take into account the public interface of a particular DataContext descendant class, whose constructor receives the instance of FluentMappingSource.

    Before the mapping generation, the new configurations are created, the existing ones are finalized, and the conventions are applied. Conventions are fully-functional, you can use them for creating new configurations, finalizing of existing one, and add classes and properties to ignore lists.

    While generating mapping, ignore lists of classes and properties have priority over the ready configurations: if an object from an ignore list has an explicitly created and added configuration, still it is excluded from the mapping generation process.