Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7653505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:03:04+00:00 2026-05-31T12:03:04+00:00

Assuming the objects you’re mapping with AutoMapper require no custom mappings, is there ever

  • 0

Assuming the objects you’re mapping with AutoMapper require no custom mappings, is there ever a point in doing this:

Mapper.CreateMap<Src, Dest>(); 
// ....
Mapper.Map(SrcObject, DestObj);

If no custom mappings are required, does the above approach gain you anything over just using DynamicMap without the need for any prior configuration?

Mapper.DynamicMap(SrcObject, DestObj);

I do understand that DynamicMap is required when you’re mapping anonymous types, but I’m asking about whether DyanmicMap is ever not preferred for static types that require no custom mappings.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:03:05+00:00Added an answer on May 31, 2026 at 12:03 pm

    Been a while since I last used Automapper, but if I remember correctly:

    In order to use Map, you need to specify those Maps explicitly first via CreateMap. Afterwards you can validate your Configuration by calling AssertConfigurationIsValid.

    This happens right after launching your application rather than encountering an error mid execution (given that you create the mappings and validate on startup, which is recommended).

    Also some types do not match 1:1, so you would want to specify the exact mappings, not sure if DynamicMap makes use of the Maps you have introduced manually, actually I think it does not.
    Just checked, DynamicMap falls back on existing Maps in the current version up on github.

    It’s also a matter of performance since DynamicMap uses reflection more heavily than the Map method, since you have already specified the mapping configuration and most of it does not have to bee asserted on the fly anymore. Not sure if the new version of Automapper is performing caching in this regard by now though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assuming there are 5 items in the settings file ( MySetting1 to MySetting5 ),
Assuming these objects... class MyClass { int ID {get;set;} string Name {get;set;} List<MyOtherClass> Things
Assuming I am designing a collection of objects for use by others and assuming
Assuming I have object_list list which contains objects. I want to check if my
Assuming I have Customer and Order objects, where one Customer can have many Orders
Assuming a collection of objects, each of which needs to be drawn at a
Assuming a simple set of inherited Model classes, like this: class BaseObject(models.Model): some_field =
Assuming I have an array of User objects where each object is actually one
Assuming I have a list of objects that have the following fields parent value
Assuming that writing nhibernate mapping files is not a big issue....or polluting your domain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.