The best video on the subject that I've seen in KZbin. Thank you very much!
@MohamadLawand Жыл бұрын
Thank you it’s appreciated
@a.r.kengilish45892 жыл бұрын
God's blessing will upon on you sir. Thank you so much.
@khwajanamatullahseddiqy6999 Жыл бұрын
Excellent and useful video step by step. Thank you Mr. Mohammad Lawand.
@josbex16843 жыл бұрын
Muchas gracias mister Mohamed, gran contenido.... saludos de los andes peruanos
@2005Azm2 жыл бұрын
Thank you for the teaching!!
@mahfoudbouabdallah62862 жыл бұрын
Hello Mohamad first of all thank you very much for your great tutorials you make. I am hoping you add automapper to this project. Big thanks from Algeria 🇩🇿
@ammarmahmoud46432 жыл бұрын
Thank U very much Mohamed
@Ranjeetsingh-bw4im3 жыл бұрын
Hey Mohammed, thanks for the video, I like your way of teaching, can you make some videos for multithreading, async/await, please?
@HelloWorld-th9vb2 жыл бұрын
Thank you for sharing your knowledge 🙏
@eser-sahin3 жыл бұрын
Many thanks for your efforts. The content is very clean as always. God bless you.
@an.truong Жыл бұрын
Excellent. Thank you so much
@VongsiLoryongpao3 жыл бұрын
Thanks for sharing, just searching for it this morning :)
@farzaibsheikh97642 жыл бұрын
why did you add your dbContext in generic repo while you're directly hitting DbSet ??
@yousseftayek60313 жыл бұрын
Thank you very much sir, it's really awesome.
@NG-tn8cn2 жыл бұрын
Thanks a lot for this video, it's all clear !!!
@UnpluggedPerformance2 жыл бұрын
thanks bro for all the effort, love it
@nimanikoonazar15412 жыл бұрын
thanks mohammad greate course
@at39633 жыл бұрын
Amazing work, I am subscribed to your channel now
@Chris-ll5fv3 жыл бұрын
thanks for the video. Is it needed to do add and delete async in the generic repository? I thought just the SaveChangesAsync is an async operation. With Add and Delete you are only changing the object in memory or not ?
@wikisurfer90322 жыл бұрын
Amazing video, helped a lot . Kudos
@timb002 жыл бұрын
actually a great video which helped me understand my colleagues code :D thanks!
@1984rebwar2 жыл бұрын
thank you Mohamad for this amazing tutorial, when you create a DbSet property you set this as a virtual what's benefits of declaring as a Virtual vs not Virtual, and when we can inheritance from IGenericRepository in UserRepository why do we need to create a class for GenericRepository ? thank you again
@husseinshukre38283 жыл бұрын
Great content and well made video, keep the good effort 👌👌
@AltP3 ай бұрын
Very impressive presentation on Repository Pattern and Unit of Work. I am having problems accessing your website. I am also not able to find the repository of this demo app on your GitHub account. Is it still available?
@echir47882 жыл бұрын
Thanks for this video sir, may I ask if what is the difference between repository pattern and service layer, because there seems to be similarity and I want to know what really is the difference. Thank you so much.
@stunna44982 жыл бұрын
the service layer is where you gonna do your business logic then you call the repository to actually commit those changes you did in the business logic
@jamkas69543 жыл бұрын
هل ممكن بعض المحاضرات بالعربي نفتقد في العالم العربي للمحاضرات المتقدمة باسلوبك الشيق
@ashwanisingh30493 жыл бұрын
Awesome 👍
@chyldstudios3 жыл бұрын
Comprehensive!
@zanudas38772 жыл бұрын
thx for video
@hazemkerret27723 жыл бұрын
thanks a lot. would you please share with us, how to implement search functionality with multi parameters like date from to, userName, Id, ... etc. I search a lot but most of the video explain only search functionality without parameters input..! appreciate your efforts. Thanks
@Ka8eeM3 жыл бұрын
Did you find a direct way? please, if you did let me know
@UberEverywhereSKRT2 жыл бұрын
quick question my brother, what is the point of overriding the generic methods ? I thought we should only add methods that are unique to the the repo, and use generic methods in general
@olegalekos21812 жыл бұрын
Exactly what i was thinking. Seems like a bad example!
@olegalekos21812 жыл бұрын
Why do you have the generic repository if you are implementing all the methods inside the specific repository ?
@oldboy19002 жыл бұрын
Thank you so much
@WhipTeslaModel32 жыл бұрын
Genius
@rikudouensof Жыл бұрын
Thanks a lot, I am revisiting this video because i want cut time in a private project. I created a project with much more Tables. Some tables with their primaryKey not on same datatype, I do not have to implement the unit of work in the Specific Repository, and did something funny that works. public class GenericRepository : IGenericRepository where T : class K is now the type of the primary Key. of cause not all activity there is a Task some are Syncronious
@jorysoft14362 жыл бұрын
واضح ان حضرتك من اصل عربى
@jesperkped2 жыл бұрын
I am confused on why you would still make your application depending on EntityFramework - when you are trying to decouple the data persistence layer from the application by using the repository pattern. The way you do - you do not really have the benefits you talk about in the start. You do not have separation of concerns. As you add EntityFramework as a service then all the functions are available to the programmer - this is not the right way to do it. The DbContext should only be known by the implementation of the database abstraction layer and not by the application itself.
@olegalekos21812 жыл бұрын
Looks like a bad example, also the generic repository has no value at al with this example.
@SHUJA8373 жыл бұрын
Hello Mohamad, thank you for this great job. I have a question let assume a simple model: Category(id, designation), SubCategory(id, cat_id, designation), Item(id, subcat_id, designation), order(id, item_id,price,qty). I m wondering if I need add all these entities in the unitofwork. If I understood well the UOW is just to send the changes to the database. Should I add all the repositories of all these entities(Category,SubCategory,Item) in the UOW? because I assume the user will fill them only once . Thanks
@stunna44982 жыл бұрын
what if you wanna use transaction scope from entity framework? suposse you have a service that has multiple save changes and you need those ids to continue the operations. After you done everything you would want to commit everything and if something happened everything rollesback. Would you create a new method on IUnitService to start the transaction and then another method to commit those transactions?
@ibrahimhasaneen92763 жыл бұрын
hello mohammed , thank you for this great content , But I have question I see people create new solution and put Core and Repository as classLib and api in separate webApi not Folders in webApi project which way is better do you thnk?
@MohamadLawand3 жыл бұрын
Hello Ibrahim, It's used to organise your code, as its going to allow you to extend and build new functionality easier when you approach it this way. Thank you for your support
@benderios3 жыл бұрын
the first one is better, if you are developing big application
@dsjamg78062 жыл бұрын
Hello, whats happen when i like add new Table, i should create the same number of class? Thanks
@pubg-gamer21883 жыл бұрын
Hi Mohammed, The Repository pattern web api with MongoDB is good to have? What you think?
@gopalchudal17172 жыл бұрын
nice video, how to use storeprocedure in repository pattern.
@SharjeelRasheed11 ай бұрын
Nice name
@NG-tn8cn2 жыл бұрын
as for the DisposeAsync method inside the uintofwork class, how can I call it in case of asynchronous call?
@orlandojoaobita78762 жыл бұрын
Thank you for this great video well explained Mohamad! Please can you help me on saving related entities. I means by that save an entity that has a foreign key of first saved one. Thanks in advance !
@orlandojoaobita78762 жыл бұрын
Please not that I am not using Guid, I left the database to generate the Id.
@ss-de5im3 жыл бұрын
спасибо
@viktorolsson6342 жыл бұрын
Can someone please explain. In the genericrepository. Why do we need applicationDbContext there when we dont use the instance in that class?
@luisandrade90542 жыл бұрын
Hey, that's a good question! I wonder the same. I consider you may not need it as a property for the GenerecirRepository class but you do need it to initialize instance of dbSet property. I just test it this way and it worked. public class GenericRepository : IGenericRepository where T : class { private readonly ILogger _logger; protected DbSet _dbSet; public GenericRepository( ApplicationDbContext context, ILogger logger) { _logger = logger; _dbSet = context.Set(); // Right in here } ... }
@olegalekos21812 жыл бұрын
It is a bad exmaple and practice. I was wondering the same.
@umeryounas87333 жыл бұрын
Subscribed plz add section to query related data using repo thank you
@MTSightseeing Жыл бұрын
can you tell me extension dotnet in visual studio code
@mimrankhan99742 жыл бұрын
If i have 100 of repository how do i manage in unite of work
@arunbm1232 жыл бұрын
you have not implemented transactions ?
@codeforme88602 жыл бұрын
So many coding issues whit this. You should not return bullion on a task, you should return the task result. Do not use IEnumerable it can cause performance issues. If you have a DB exception, you should feed that back the exception up the application Delete is over engendered Code review grade C
@kedarkulkarin786 ай бұрын
github code is not available it seems
@tothedust3 жыл бұрын
First
@zcoderminer2 жыл бұрын
On video timeline kzbin.info/www/bejne/Y5vGl2SHpp10Y5Y down to kzbin.info/www/bejne/Y5vGl2SHpp10Y5Y is wrong implementations.
@NG-tn8cn2 жыл бұрын
Why it's wrong? what can be improved is that there is already a selection method by id, so in the update method the other method can be called
@compman733 жыл бұрын
The Repository & Unit-of-work pattern isn’t useful with EF Core. EF Core already implements a Rep/UoW pattern, so layering another Rep/UoW pattern on top of EF Core isn’t helpful. A better solution is to use EF Core directly, which allows you to use all of EF Core’s feature to produce high-performing database accesses.
@Ranjeetsingh-bw4im3 жыл бұрын
Hey Alireza, EF provides Dbset (Which you can compare with individual repository) but if you will use dbset all over the application then your application will be tightly coupled with ef core, In future if you will want to change the ORM then it will be very difficult. If you would have used repository then you just need to change your repository implementation.