progress. in the middle of reworking QB api binding to use fluent api

This commit is contained in:
2020-10-15 13:47:44 -04:00
parent be0bc54bb9
commit 9ce87d4ecb
8 changed files with 96 additions and 34 deletions

View File

@ -6,6 +6,7 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.0.0" />
<PackageReference Include="COA.Common" Version="20.10.13.1-alpha" />
<PackageReference Include="DataObjects" Version="20.10.2.3-alpha" />
<PackageReference Include="StructureMap" Version="4.7.1" />
</ItemGroup>

View File

@ -7,12 +7,11 @@ namespace COA.EnterpriseServices.DataAccess
{
public static IMapper GetMapper()
{
var cfg = new MapperConfigurationExpression();
cfg.AddProfile<MappingProfile>();
var configuration = new MapperConfigurationExpression();
configuration.AddProfile<MappingProfile>();
//Mapper.Initialize(cfg);
// or
var mapperConfig = new MapperConfiguration(cfg);
var mapperConfig = new MapperConfiguration(configuration);
return new Mapper(mapperConfig);
}