Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jay 425 posts 652 karma points
    Feb 14, 2023 @ 16:15
    Jay
    0

    Using AutoMapper on V10

    Hi all,

    Anyone used Automapper on V10 before?

    I've used it in V8 and was trying to figure out how do I register and use AutoMapper in V10, can't find anything in the forum

    Thank you

  • Conor Howe 36 posts 137 karma points
    Feb 15, 2023 @ 11:58
    Conor Howe
    0

    Is there a requirement to use AutoMapper or could you use the Umbraco mapper instead?

    https://docs.umbraco.com/umbraco-cms/reference/mapping/

  • Corné Hoskam 80 posts 587 karma points MVP 3x c-trib
    Feb 16, 2023 @ 13:51
    Corné Hoskam
    1

    Hi Jay,

    I can confirm Automapper also works on V10, in our case using Automapper V12 on Umbraco V10. Are there any specific questions you need answering?

    Kind regards,

    Corné

  • Jay 425 posts 652 karma points
    Feb 16, 2023 @ 14:26
    Jay
    0

    Hi Corne,

    Do you use any Automapper Profile?

    I'm having issues using that to call the ForMember() to map properties from source to destination which are different.

  • Corné Hoskam 80 posts 587 karma points MVP 3x c-trib
    Feb 16, 2023 @ 14:29
    Corné Hoskam
    0

    Hi Jay,

    We're using a bunch of different profiles, and even more Type & Value Converters in this specific project. Depending on the scale and custom models you wish to use, you will need to use more custom profiles & converters. You might want to look into the specific ForMember configuration issue that you're running into, as I don't see any Umbraco specific issues causing this (atleast in my experience so far!)

  • Jay 425 posts 652 karma points
    Feb 22, 2023 @ 16:45
    Jay
    0

    Hey Corne,

    Jumping back onto this.

    Quick one. Do you have the codes on how you add your profiles to the MapperConfiguration on startup?

    Got all thiose automapper profiles with me but it's not picking up

    thanks

Please Sign in or register to post replies

Write your reply to:

Draft