Missing type map configuration or unsupported mapping
See original GitHub issueHi,
I’m getting this error:
“AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.
PipetteModelDto -> Expression1 PipetteModels.PipetteModelDto -> System.Linq.Expressions.Expression
1[[System.Func`2[[VolumetricsDomain.PipetteModel, VolumetricsDomain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, …”
Seems that when tring to make: await _context.PipetteModels.Persist (_mapper).InsertOrUpdateAsync(PipetteModelDto);
Is expecting a map to a expression and not something line I have rigth now: CreateMap<PipetteModel, PipetteModelDto> () … .ReverseMap ();
On startup I have: services.AddAutoMapper ((serviceProvider, automapper) => { automapper.AddProfile(new MappingProfile()); automapper.AddCollectionMappers (); automapper.UseEntityFrameworkCoreModel<DataContext> (serviceProvider); automapper.SetGeneratePropertyMaps<GenerateEntityFrameworkCorePrimaryKeyPropertyMaps<DataContext>>(); }, typeof (DataContext).Assembly);
What would be the correct mapping to use from a dto to a EF Core class ?
Thanks Eduardo
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (4 by maintainers)
Top GitHub Comments
@felaray you are not initiating this package in the mapping configuration. See configuration example in the readme.
The ‘**Missing type map configuration or unsupported mapping.’ Is from automapper that changed a default settings, see their breaking changes.