Mapping package for .NET Standard.
Branch | CI |
---|---|
master | |
develop |
The package defines the following concepts.
Mapper interface used to resolve mappers in the service container.
Resolves mappers using the IMapper
interface using the source and destination types in the service container.
Throws a MapperNotFoundException
if no mapper is found.
Map either of the following:
IMappingService.Map<TSource, TDest>(TSource source)
IMappingService.Map<TSource, TDest>(IEnumerable<TSource> source)
Register during startup through the AddMapping
extension on IDependencyInjectionRootComponent
.
// Add root component
services.AddLightOpsDependencyInjection(root =>
{
// Add component
root.AddMapping(component =>
{
// Configure component
// ...
});
// Register other components
// ...
});
Overrides may be registered in the component configurator action, see IMappingComponent
for documentation.
LightOps.DependencyInjection
- 0.1.x