How to implement AutoMapper in Asp.Net Core

Поділитися
Вставка
  • Опубліковано 18 чер 2024
  • In one of the previous videos we have discussed why using DTOs in API projects is vital. Now it''s time to introduce a very powerful tool that helps us to automatically translate our domain models to DTOs: AutoMapper. The good thing about AutoMapper is that it actually works almost out of the box, with a minimal configuration, based on conventions. During this video we do everything from scratch: we install Automapper via NuGet, add AutoMapper to the DI container in ASP.Net Core, configure mapping profiles and, last but not least, inject an IMapper in our controler and use it to do its magic.
    Chapters:
    1. Intro: 00:00
    2. Installing AutoMapper: 02:48
    3. Adding AutoMapper to the DI container: 03:54
    4. Creating Automapper Profile classes: 05:18
    5. Injecting IMapper in controllers and start mapping: 11:16
    6. Implementing custom mappings: 15:49
    7. Summary: 19:39
    Why do we use DTOs? • Why do we use DTOs in ...
    #AspNetCore #AutoMapper #dotnet
  • Наука та технологія

КОМЕНТАРІ • 22

  • @chacataplan
    @chacataplan 2 роки тому

    Thk thk resolved my problem!!!! with data relational, Greetings from Peru!!

  • @shriramsaravanan8885
    @shriramsaravanan8885 Рік тому

    Thank you so much, I was stuck with this issue for the past 4 hours.

  • @ddng9969
    @ddng9969 2 роки тому +1

    I Love your guide on Automapper, been looking forever for a guide so specific like this, thanks you a lot, this is what i need for my graduation project bonus

  • @talkathiriify
    @talkathiriify 2 роки тому +1

    Thank you so much for this.
    I spent more than 2 days figuring out how to do this.
    Again thanks allot and best regards.

    • @Codewrinkles
      @Codewrinkles  2 роки тому

      I'm so glad that this video was useful to you. Thanks for dropping a comment.

  • @shauncs
    @shauncs 2 роки тому

    thanks for the great video..! Looking forward to have more videos on .net core and EF.

  • @karimmessaoud8223
    @karimmessaoud8223 2 роки тому

    This video was useful for me. Thank you for the explanation.

  • @GijZagevent
    @GijZagevent Рік тому

    Very helpful, thank you so so much!

  • @w123au
    @w123au 2 роки тому

    Thank you very much. Explained in very simple and excellent way. Why other people just complicate simple things...

  • @mkiwan996
    @mkiwan996 2 роки тому +4

    I really like if you make a video on the advanced functions, other than reverseMap, and AfterMap.... just to see when and in which casea we could use them
    Anyway, this video is very helpful, and keep up the good work 👍

    • @Codewrinkles
      @Codewrinkles  2 роки тому +3

      Thank you very much for your feedback. I was already thinking about a video on some more advanced functions on Automapper like projections and the EF extensions. Now, that I also saw there is demand for this, I'll definitely do that.

  • @liviocaenazzo9260
    @liviocaenazzo9260 2 роки тому

    Excellent, thank you a lot

  • @Innovatorsoft
    @Innovatorsoft 2 роки тому

    Nice concept

  • @mouradaissani8957
    @mouradaissani8957 2 роки тому

    Thnx, keep it up

  • @lukoppc
    @lukoppc 2 роки тому

    Nice explanation. I came here after seeing the documentation and get lost in the Dependecy Injection section where it says to add assamblies and I didn't know what the meant by that LOL

  • @somayehsheikhi7839
    @somayehsheikhi7839 Рік тому

    Thank you sir

  • @royvethanayagam5888
    @royvethanayagam5888 2 роки тому

    It is that easy or you made it easy ;). Thank you.

    • @Codewrinkles
      @Codewrinkles  2 роки тому

      It is easy :). Thank you for your comment!