AutoMapperBootStrapper¶
Registers the full set of AutoMapper type maps needed by the Collections services, pairing SAIF.Data.Model.Collections (and related Contacts/Tasks/Locations/Legal.Notes) persistence entities with their SAIF.Core.Contracts.Collections domain equivalents. It has no collaborators of its own and operates entirely through the static AutoMapper Mapper class; CollectionsService's static constructor calls Configure() once to ensure these maps exist before any Collections mapping is performed.
Purpose¶
- Establishes bidirectional (where marked
.ReverseMap()) or one-way mappings between Collections data-model classes (Case,Debtor,Note,Transaction,Location, tasks, and reference-code tables) and their domain contract counterparts. - Centralizes AutoMapper configuration for the Collections feature area so callers do not need to configure maps individually.
Context¶
- Namespace:
SAIF.Services.Collections - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| Configure() | public static void Configure() |
Registers all Collections-related Mapper.CreateMap<TSource, TDestination>() pairings (cases, debtors, notes, transactions, locations, tasks, and reference-code tables) with the static AutoMapper configuration. |
Behavioral notes¶
- Mutates the process-wide static AutoMapper
Mapperconfiguration as a side effect; because the maps are added statically, callingConfigure()more than once may raise an AutoMapper configuration-duplication error*. - Is invoked once from
CollectionsService's static constructor, so the maps are available before any instance of that service performs mapping*.
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
- Services/SAIF.Services/Collections/AutoMapperBootStrapper.cs