I have read recently that it is not good practice to use the repository pattern in conjunction with an ORM. From my understanding this is because the abstraction they provide over the SQL database is too leaky to be contained by the pattern.I have a couple of questions about this:What do you do if you want to switch out ORMs? You would have ORM specific code in your application if you do not contain it in a repository.Is the repository pattern still valid when not using an ORM and you are using ADO.NET for data access and populating object data yourself?If you use an ORM but not the repository pattern where do you keep commonly used queries? Would it be wise to represent each query as a class and have some sort of query factory to create instances?
When to use repository pattern
design patterns;orm;repository