We've created a universal generic interface. But can we make universal repository which will work with any kind of models (products, clients etc.)? Or the solution is just implementing same interface multiple times by one repository?
Hi, Phani. I will be covering constraints in an upcoming video (I know it's been a while, but I will have more videos soon). In the meantime, you can look at the Walkthrough PDF on my website that covers constraints: www.jeremybytes.com/Downloads/Generics.pdf
Bro although assuredly you meant well and did a nice job, I couldn't let go of the obvious John Smith Jeremy Smith error for GetPerson(), but I'm just suffering through these to get to the latter videos , but yea my two cents
There is a view among architects that Repository is an anti pattern. rob.conery.io/2014/03/04/repositories-and-unitofwork-are-not-a-good-idea/ I know it's a bit out of scope for this but I wonder repository is the best concept to demonstrate generics.
Rob's article is primarily about putting a Repository on top of Entity Framework (which can be considered a Repository itself); This is unnecessary, and extra layers of unused abstractions make code difficult to maintain. The main reason that I use Repositories as examples is that the concept is easy to grasp, particularly when showing advantages of loose coupling with interfaces and dependency injection. Repository might not be the best example here, but it does show how generics can make an interface more flexible. I'm generally a fan of more explicit method names for repository methods, so I reserve Repository for specific circumstances. I've written a bit more about repositories here: jeremybytes.blogspot.com/2013/08/do-i-really-need-repository.html Thanks for the comment. I'm always looking for ways to improve my code.
so far the best tutorial I have seen on generic interfaces, thank you so much for sharing the knowledge!
Really great tutorial to understand the usage of Generic Collections. Thank you Jeremy
This video was really helpful and neat.Answered so many queries that I had for the longest time.Thanks Sir Clark.
You are a very good teacher!
I Have learned a lot from the Generics videos.
I'll be sure to check out future uploads :)
one of best video i ever have seen, many thanks Jeremy
Well Explained Clark, Thanks for taking time to share the Knowledge.
Hi Jeremy,
You are very good at teaching c#.
Please add more videos on complex c# topics.
We've created a universal generic interface. But can we make universal repository which will work with any kind of models (products, clients etc.)? Or the solution is just implementing same interface multiple times by one repository?
Excellent explanation. really great tutorial. Thank you very much.
can you post some videos on Expression trees and Covariance and contravariance
good presentation!! excellent video on generis
very well explained! excellent video
Fantastic tutorial
Jeremy, Could you please also discuss Constraints on generic and other advanced topics... thanks anyway!
Hi, Phani. I will be covering constraints in an upcoming video (I know it's been a while, but I will have more videos soon). In the meantime, you can look at the Walkthrough PDF on my website that covers constraints: www.jeremybytes.com/Downloads/Generics.pdf
Bro although assuredly you meant well and did a nice job, I couldn't let go of the obvious John Smith Jeremy Smith error for GetPerson(), but I'm just suffering through these to get to the latter videos , but yea my two cents
very very good tutorial! thanks.
Thank you! This makes learning this stuff crazy simple! Keep up the amazing vids!
Really helpful video.
amazing videos! thanks
great video
There is a view among architects that Repository is an anti pattern. rob.conery.io/2014/03/04/repositories-and-unitofwork-are-not-a-good-idea/
I know it's a bit out of scope for this but I wonder repository is the best concept to demonstrate generics.
Rob's article is primarily about putting a Repository on top of Entity Framework (which can be considered a Repository itself); This is unnecessary, and extra layers of unused abstractions make code difficult to maintain.
The main reason that I use Repositories as examples is that the concept is easy to grasp, particularly when showing advantages of loose coupling with interfaces and dependency injection. Repository might not be the best example here, but it does show how generics can make an interface more flexible. I'm generally a fan of more explicit method names for repository methods, so I reserve Repository for specific circumstances.
I've written a bit more about repositories here: jeremybytes.blogspot.com/2013/08/do-i-really-need-repository.html
Thanks for the comment. I'm always looking for ways to improve my code.
Shall read it. I just wanted to get your opinion about the Rep pattern. It's always refreshing to get the opinions of experienced developers. Cheers.
Awesome..
Awesome but watch at speed 1.25x