.NET 6 - AutoMapper & Data Transfer Objects (DTOs) 🗺

Поділитися
Вставка
  • Опубліковано 18 чер 2024
  • In this video we will be going to be discussion AutoMapper and DTOs in .NET 6 Application why do we need it and how can we implement it in our .NET 6 Web API.
    Support me on Patreon to access the source code:
    / mohamadlawand
    Agenda:
    00:00 Intro
    00:42 What is AutoMapper
    01:38 Creating the API
    02:25 Install Nuget Packages
    04:30 Creating Models
    06:18 Creating Controller
    18:53 Testing our controller
    21:10 Creating DTOs
    23:57 Adding DTO to our Controller
    27:45 Adding AutoMapper Profile
    37:02 Updating Program.cs
    38:18 Updating our controller to use AutoMapper
    43:53 Adding additional DTOs
    45:02 Updating the Profile for the new DTO
    48:09 Updating controller with new Mapping/DTO
    52:45 Final Summary
    Create .NET 6 Web API
    • Build CRUD with .NET 6...
    .NET 6 and PostgreSQL
    • .NET 6 PostgreSQL and ...
    Middlewares
    • Asp.Net Core - Middleware
    Dependency Injections
    • Asp.Net Core - Depende...
    Let us connect:
    🌍 My website - mohamadlawand.com
    📸 Instagram - / mohamadlawand087
    🐦 Twitter - / moe23
    ♯ Github - github.com/mohamadlawand087
    🎫 LinkedIn - / mlawand
    💥 LinkTree - linktr.ee/mohamadlawand
    Gear I use (affiliate link): amzn.to/3EbT8Jw
    Support my work:
    / mohamadlawand
    www.buymeacoffee.com/mohamadl...
    Hire Me:
    transactions.sendowl.com/prod...
    WHO AM I:
    I'm Mohamad, a Enterprise Architect working in Manchester, UK. I make videos about web, cloud, desktop and mobile development.
    GET IN TOUCH:
    If you’d like to talk, I’d love to hear from you. Tweeting @moe23 directly will be the quickest way to get a response, but if your question is very long, feel free to email me at hello@mohamadlawand.com.
    #dotnet #automapper #api

КОМЕНТАРІ • 19

  • @HilalYazbeck
    @HilalYazbeck Рік тому +4

    someone is salty about the 2021 F1 season :D, thanks for the videos. awesome job

  • @saifumar3001
    @saifumar3001 Рік тому +7

    Nice work Bro .Thanks for explaining it so clearly and concise

  • @ronyaiaron
    @ronyaiaron Рік тому +1

    Thanks Mohamed, it was very clear! Keep up the good work!

  • @sidisidahmed755
    @sidisidahmed755 Рік тому +2

    Just perfection !!!!! thanks man i needed this especially at this period of my study , looking for internship

  • @clivebird5729
    @clivebird5729 Місяць тому

    Very very helpful Mohamad.

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

    Thanks a lot! I never understood very well how mapper worked on background so I hated everytime when I heard it, now thanks to ur explanations I love it!

  • @manarmaher8877
    @manarmaher8877 4 місяці тому

    you are so great thank you for your effort 😍

  • @adicka9926
    @adicka9926 Рік тому +1

    Thanks so much

  • @mr.django8409
    @mr.django8409 7 місяців тому

    Mohammed you the best because of am in love with .net

  • @ivandrofly
    @ivandrofly Рік тому +3

    21:10 - I like the way you structured the project folder - Models\Dtos
    There are several threads on question what the differences between Dtos and Models
    Dtos are model but not all models are dtps

  • @timothymcgrath4072
    @timothymcgrath4072 7 місяців тому

    Thanks!

  • @Tamer_Ali
    @Tamer_Ali Рік тому +2

    Hi Mohamed, could you please talk about CQRS in details?

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

    Hi Mohamed, thanks for the great content. But can please also demo the DriverForUpdateDto. I’m having an issue with my [HttpGet] method is throwing an exception but firstly it was coming with an empty form to update.

  • @aebdigital6283
    @aebdigital6283 5 місяців тому

    Hi Mohamad, thank you for your video. Quick question if you please, is there a reason why in the DTO profile class you mapped each property instead of ignoring the ones you dont want to map ? I was looking for a video to understand more when to use the ignore option in the DTOprofile class, and I came across your video and noticed the way you did is different than what I'm used to, any explanation will be greatly appreciated. Thanks again

  • @Marcos-XurryPET
    @Marcos-XurryPET 4 місяці тому

    Fantastic work!!!
    How to add FormMember type ICollection over other map. ????
    Regards.

  • @praktycznewskazowki6733
    @praktycznewskazowki6733 Рік тому +1

    You look like Grzegorz Róg :o

  • @murtazotoshniyozov4688
    @murtazotoshniyozov4688 2 місяці тому

    Good day Sir. Do you use MacBook for .NET Development? If yes, how would you describe your experience with MacBook. Some people say it is not comfortable with it while others say opposite one.