The text of this article is not in this database — only its details are. Read it on the old site: Implementing Repository Pattern And Dependency Injection In ADO.NET Using Generics In C#
21 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

kannan desikanPosted Aug 20, 2022, 7:30 AM
UserServiceClient used in runtime assembly using reflection
Oghnz EPosted Nov 14, 2021, 3:29 PM
Can you show the implementation of the DbContext?
Satyaki ChakrabortyPosted Dec 12, 2018, 12:27 PM
As per book of martin fowler the book of design patterns, the repository should not have insert and update. you are using CreateUser method on User repository. can you explain why?
Jack SantosPosted Aug 8, 2018, 6:17 AM
Thank you for sharing this wonderful article! Anyway I just want to ask about the UnitOfWork part which confuses me a little bit, this code : CreateUnitOfWork(), how does it work and var uow = new AdoNetUnitOfWork(transaction, RemoveTransaction, RemoveTransaction); anyway thank you!
Digit PrincePosted Apr 17, 2018, 7:59 AM
Thank you..........
Satyaki ChakrabortyPosted Sep 16, 2017, 1:34 AM
Hi Ehsan, how will you implement public class UserRepository : Repository because your Repository class expecting generic type.
Arvind ChourasiyaPosted May 31, 2016, 2:02 AM
Thank you..I'm trying the same.
Ehsan SajjadPosted May 30, 2016, 3:25 PM
Arvind Chourasiya it is same c# so you would just need to worry about the queries part, else would be the same
Arvind ChourasiyaPosted May 16, 2016, 9:09 AM
How to create repository for android xamarin using SQLite.
Ehsan SajjadPosted Jan 17, 2016, 9:12 AM
Thanks @Arul R
Arul RPosted Jan 17, 2016, 3:25 AM
Nice share
Ehsan SajjadPosted Jan 14, 2016, 7:34 AM
Thanks to all for appreciating
Santhakumar MunuswamyPosted Dec 22, 2015, 10:46 AM
Thanks for nice share
Humayun Kabir MamunPosted Dec 14, 2015, 1:16 AM
Nice...
Raja TPosted Dec 13, 2015, 11:12 PM
Good,thank for sharing