question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing type map configuration or unsupported mapping

See original GitHub issue

Hi,

I’m getting this error:

“AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping. PipetteModelDto -> Expression1 PipetteModels.PipetteModelDto -> System.Linq.Expressions.Expression1[[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:closed
  • Created 4 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Tastefulcommented, Oct 24, 2020

@felaray you are not initiating this package in the mapping configuration. See configuration example in the readme.

1reaction
Tastefulcommented, Oct 24, 2020

The ‘**Missing type map configuration or unsupported mapping.’ Is from automapper that changed a default settings, see their breaking changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automapper missing type map configuration or ...
If the configuration isn't registered before calling the Map method, you will receive Missing type map configuration or unsupported mapping.
Read more >
Missing Type Map Configuration or Unsupported Mapping
The “missing type map configuration or unsupported mapping ABP” occurs in AutoMapper when the source and destination types are not compatible. For example,...
Read more >
Missing type map configuration or unsupported mapping
Hello guys, in this video we will learn about how to solve error Missing type map configuration or unsupported mapping in asp.net mvc....
Read more >
Missing type map configuration or unsupported mapping.
Hello everyone! I have a Nop version 3.50 that run just fine at my VS local, but after I deploy the solution to...
Read more >
Missing type map configuration or unsupported mapping
I am getting this error "Missing type map configuration or unsupported mapping" after every time my app restarts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found