Repository Pattern without LINQ or other ORM?

前端 未结 3 1422
花落未央
花落未央 2021-01-21 06:47

Does it makes sense to use the Repository pattern without the use of LINQ or some other ORM? I am writing an application in MONO and using MySQL, was thinking of using the repo

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-21 07:08

    Repository has nothing at all to do with IQueryable. What you are thinking of is the Rob Conory .net 3.5 take on the repository pattern, which is actually more of a data broker pattern.

    A repository is responsible for returning objects, and deals with data access so that the rest of your application can remain ignorant of it.

    You can see a very high level description on Martin Fowlers site

提交回复
热议问题