Using Unit of Work Pattern

preview_player
Показать описание
Unit of work and repository pattern goes hand in hand. We use Unit of Work to perform various CRUD operations on multiple repositories as a single Unit of Work. Means either all of operations should be successful in a transaction or nothing should be committed to the persistence storage. It will help to avoid database inconsistency.

Next we will understand what is Data Transform Objects (DTO) and how those are important to protect our API from various security vulnerability.

Code of up to this point is available on below GIT repository

You can support me by donating on

Thanks
Studymash
Рекомендации по теме
Комментарии
Автор

I don't have words to say, even a person will spend lakhs of rupees but won't get this much of understanding, I watched all video of this series more than 3 times & will watch more no of times, Really by watching again & again video, I understand the concept very well. Thank You so much @study Mash..lots of Respect for you!

PrinceKumar-ebhd
Автор

I watching lot of videos and trying to understand UOW. This is the shortest and the best one. Now I understand what uow is. Thanks a lot. Keep up!

codeschool
Автор

After a lot of research, Finally here is someone who can throw away my confusion. Thank you man..!

sandeepreddy
Автор

Best way to explain it. THANKS! you help me understand the last part with the BEGIN TRAN and COMMIT TRAN analogy!! Excellent work! Im subscribing!

javierfelixalonsolopez
Автор

Wish I could like your videos multiple times over :) I've been a developer for a decade and still learn a lot from your videos.

samerelsahih
Автор

After 1 minute of watching the video I added you to my favs. Subscribed. I really like your way of explaining things. and topics you teach!!! I wish your examples were in java and jpa.

Apprenticer
Автор

Thank you for the new video been waiting for a while.

harrylyod
Автор

Enlightening tutorial on an elegant pattern.

flywheel
Автор

Thanks a lot. Very well explained. Saved my day.

gajendrasalunkhe
Автор

very explanative. understood many things i left out.

tmmuttathara
Автор

Nice and easy to understand content for beginner !!

nileshprajapati
Автор

wat a video. amazing. thanks
one query: does it mean that if we are using EF core then there is no need to implement uow, repository patterns explicitly?

avinashg
Автор

Should a Unit of work have all the repositories? Or should only have the repositories used on the endpoint? Or should only have one repository ? (doesn't seem to make sense)

nelsonthekinger
Автор

what if we have store procedures, do we still need UOW?, because most of SPs are complete script for saving changes and everything we just need to call it.

mi
Автор

what about TransactionScope() ? is it an alternative to unit of work?

khaledsaleh
Автор

Can you use a generic repository instead of using multiple Repositories

eswar
Автор

Why didn’t you inject CityRepository into your UnitOfWork class? I don’t think newing up the repository is a good idea because that also violates dependency inversion.

goodoleme
Автор

hi, i have some sort of question,
putting all repositories in a single uow class is normal way ?
or we should create multiple uow depend amount of relationship between repositories ?

sajad
Автор

can you give us a simple practical example sir

mahmoodamer
Автор

Wrong implementation. You breached the "D" of SOLID pattern by initializing the repository manually inside UnitOfWork. How would you MOCK the UOW in tests as it depends on concrete implementation of repository, Shouldn't it depends on abstraction (i.e. interface of repository) and dependency (repository) should be injected at run time.

rishikashnia