feat(Repository): Add and implement ReadOrDefaultAsync method.
- add read method can map for each
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageId>DigitalData.Core.Infrastructure.AutoMapper</PackageId>
|
||||
<Version>1.0.0</Version>
|
||||
<Version>1.0.1</Version>
|
||||
<Authors>Digital Data GmbH</Authors>
|
||||
<Company>Digital Data GmbH</Company>
|
||||
<Product>DigitalData.Core.Infrastructure.AutoMapper</Product>
|
||||
@@ -16,8 +16,8 @@
|
||||
<RepositoryUrl>http://git.dd:3000/AppStd/WebCoreModules.git</RepositoryUrl>
|
||||
<RepositoryType>digital data core abstractions clean architecture mapping</RepositoryType>
|
||||
<PackageTags>digital data core infrastructure clean architecture mapping</PackageTags>
|
||||
<AssemblyVersion>1.0.0</AssemblyVersion>
|
||||
<FileVersion>1.0.0</FileVersion>
|
||||
<AssemblyVersion>1.0.1</AssemblyVersion>
|
||||
<FileVersion>1.0.1</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -14,7 +14,11 @@ public class EntityAutoMapper<TEntity> : IEntityMapper<TEntity>
|
||||
|
||||
public TDto Map<TDto>(TEntity entity) => _rootMapper.Map<TDto>(entity);
|
||||
|
||||
public IEnumerable<TDto> Map<TDto>(IEnumerable<TEntity> entities) => _rootMapper.Map<IEnumerable<TDto>>(entities);
|
||||
|
||||
public TEntity Map<TDto>(TDto dto) => _rootMapper.Map<TEntity>(dto);
|
||||
|
||||
public IEnumerable<TEntity> Map<TDto>(IEnumerable<TDto> dtos) => _rootMapper.Map<IEnumerable<TEntity>>(dtos);
|
||||
|
||||
public TEntity Map<TDto>(TDto dto, TEntity entity) => _rootMapper.Map(dto, entity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user