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!
@StudyMash3 жыл бұрын
Thanks Prince, hope you are doing well in your new job.
@codeschool39642 жыл бұрын
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!
@StudyMash2 жыл бұрын
Glad to hear that buddy
@javierfelixalonsolopez39463 жыл бұрын
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!
@sandeepreddy4752 жыл бұрын
After a lot of research, Finally here is someone who can throw away my confusion. Thank you man..!
@StudyMash2 жыл бұрын
Glad to hear that Sandeep
@Apprenticer2 жыл бұрын
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.
@flywheel564 жыл бұрын
Enlightening tutorial on an elegant pattern.
@samerelsahih2 жыл бұрын
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.
@StudyMash2 жыл бұрын
Glad to hear that Sam
@matthayden1979 Жыл бұрын
I couldn't agree with you more!
@harrylyod34024 жыл бұрын
Thank you for the new video been waiting for a while.
@nileshprajapati1194 жыл бұрын
Nice and easy to understand content for beginner !!
@gajendrasalunkhe57503 жыл бұрын
Thanks a lot. Very well explained. Saved my day.
@tmmuttathara3 жыл бұрын
very explanative. understood many things i left out.
@nelsonthekinger3 жыл бұрын
Beautiful Engineering 👌 Well done
@rohitpawar87103 жыл бұрын
nice explaination
@techrelated24173 жыл бұрын
awsome explaination!! Thanks
@joeycopperson3 жыл бұрын
Thanks. Very good explanation :)
@NickEnchev3 жыл бұрын
Excellent video, thanks!
@nagendrakumar49833 жыл бұрын
It was pretty clear. Thanks
@nelsonthekinger3 жыл бұрын
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)
@DaveRoman-mc4nn2 жыл бұрын
Should not have all repositories. Use a generic repository and add it as a property in the IUnitOfWork interface.
@avinashg20083 жыл бұрын
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?
@goodoleme7473 жыл бұрын
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.
@mi59563 жыл бұрын
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.
@ahmadbaderkhan5983 жыл бұрын
no you don't need it . don't write more code if you don't need to . these patterns solve a problem basically . what you're describing is a non problem since stored procedures you can do multiple stuff at once . so i would just have the repo calling it
@nasmob56562 жыл бұрын
Legend !
@cmnckang82912 жыл бұрын
this is amazing
@khaledsaleh77983 жыл бұрын
what about TransactionScope() ? is it an alternative to unit of work?
@adamschneider8682 жыл бұрын
Thats ACID and just ensures that you dont store incomplete data in the database.
@eswar3384 жыл бұрын
Can you use a generic repository instead of using multiple Repositories
@StudyMash4 жыл бұрын
Yes I will use generic one for the basic functionality in upcoming lessons
@eswar3384 жыл бұрын
@@StudyMash Thanks. I am expecting CRUD operations using generic Reposit with UOW
@sajad56444 жыл бұрын
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 ?
@StudyMash4 жыл бұрын
Splitting UOW is developer's own choice, but we should always make sure to put all relational repo in single UOW, others you will end up facing transactions issue while saving the data of relational entities.
@sajad56444 жыл бұрын
@@StudyMash thank you alot, In such a way application will be slower , isn't it ? for example we have more than 10 or 20 repositories and so for a single request we are creating instance of 10(or 20) repository but we are using just two of them, yes every things have pros and cons ,but how much it can reduce speed
@StudyMash4 жыл бұрын
@@sajad5644 If you look at the UnitOfWork.cs file, you can see different repositories are accessible using properties, I have not initialized it in constructor. So the answer to your question is : No it will not be slower, because it will not create an instance of repository until you will use that somewhere in controller.
@sajad56444 жыл бұрын
@@StudyMash I realized ,tanx so much, please if you can ,in one of your future videos teach us how we should use usermanager in such a way(uow) , because as i know usermanager save transaction automaticly (i know about userStore and how to pass dbcontext instance to it but we(me and i think other guies) are not familiar with uow when using usermanager , It can be very helpful if u do that(for example what is required for creating instance of usermanager and so on..) tanx tanx tanx
@DaveRoman-mc4nn2 жыл бұрын
@@StudyMash That's a good approach, but even for each property, you're reserving memory for each repository attribute (this makes the UnitOfWork instance heavy). That's a waste of memory if you only want to use two repositories in one request.
@rishikashnia12423 жыл бұрын
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.
@StudyMash3 жыл бұрын
Good question, I like it. No, its not wrong, we are already injecting UOW at runtime in controller and your are free to create your own concrete mock UOW and your own version of concrete repo because IUnitofWork is not depend on concrete type. So you can have own repo and uow that implement IUnitOfWork and IRepository. Feel free to let me know if you still have any question.