Unit Of Work Repository Pattern c#

preview_player
Показать описание
Steps are same in both framework.
unit of work generic repository pattern c# | design patterns c#

Suggested Videos: Please watch the last two session for better understanding before proceeding
1. Previous : Repository Pattern c# :

2. Previous : Generic Repository Pattern c# :

3. SOLID Design Principles in C# | With very easy code examples

4.Dependency Injection C# | Design Pattern | ASP.NET MVC

5.Dependency Injection C# | Design Pattern | ASP.NET CORE MVC

6.Object Oriented Programming in C# | OOPS | For beginners

GitHub Repo:
Рекомендации по теме
Комментарии
Автор

Thank you for explaining Unit Of Work. It's not easy to find good explanation on YouTube, so thanks for great work! Subscribed :)

MichalJan
Автор

Thank You for great explanation. 1 quick question, here we are creating object for UnitOfWork class, we are injecting it, then what is use of IUnitOfWork interface?

vikasnagare
Автор

I enjoyed all of your videos. thank you sir

bharathip
Автор

This is a life saving vidoe... Thanks a lot

mustapharabiuadeola
Автор

Thank you for video. If possible can you please start series for data structure and algorithm using c#. Your way of explanation is very simple and it will be interesting to learn DSA from you.

sanjayheralge
Автор

Thank you for explaining but I have a question: Do you have to create multiple Repository in the UnitOfWork class. I think that whether you should create the method GetRepository to return repository for entity like this:

public IRepository GetRepository<T>
{
return new Repository<T>();
}
Do you think about this.

thanhnguyenbk
Автор

Thank you very much. But I need to clear one thing that is you are using UnitofWork wow = new UnitofWork(); in the controller, why you are not using constuctor injection. Instead of using class we can use IUnitofWork. which one is better.

shafiqurrahman
Автор

Thank you for good explanation in the video. Please make a video demonstrating how to use dependency injection as you referred in the last.

bharatchauhan
Автор

We can also make generic unit of work which will return a repository object.

Riteshtandon
Автор

thank you very much but it was better to open all of the folders so that we can see what is in them

sinaalinejad
Автор

Hi, ;)

Could You explain, should I use (and if how to implement Unit Of Work with Generic Repo when my repositories have different "crud" operations).

For example I have in one repo:
- method GetSomeObject(int id) -> that returns me an Object from Db by given Id.
- method GetSomeObjectWithDetails(int id) -> that returns me an Object but with additional data (I'm using joining table for example)

Other repo doesn't have such (second) method, what to do in that situation? I cannot use Generic Repo because I have different methods in every repo, there is only several which could be "the same".

Thanks for help!

pmro
Автор

you didn't demonstrate how the unit of work is actually benefiting. for instance if one of the tasks failed, how it roll backs.

AdnanSami-jpen