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

preview_player
Показать описание
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:

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
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

.NET 6 and PostgreSQL

Middlewares

Dependency Injections

Let us connect:

Support my work:

Hire Me:

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:

#dotnet #automapper #api
Рекомендации по теме
Комментарии
Автор

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

HilalYazbeck
Автор

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

saifumar
Автор

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

sidisidahmed
Автор

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

ronyaiaron
Автор

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!

lionsito
Автор

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

ivandrofly
Автор

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

aebdigital
Автор

you are so great thank you for your effort 😍

manarmaher
Автор

Fantastic work!!!

How to add FormMember type ICollection<A> over other map.<A, A_DTO> ????

Regards.

Marcos-XurryPET
Автор

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

mr.django
Автор

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

Tamer_Ali
Автор

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.

murtazotoshniyozov
Автор

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.

sphazwelakhe
Автор

As people typically use sql server instead of dummy data, why don't you talk about ProjectTo, defered execution, and sql query optimization, instead of Map?

jorgef