22
votes
7answers
4k views

Should Repositories return IQueryable?

I have been seeing a lot of projects that have repositories that return instances of IQueryable. This allows additional filters and sorting can be performed on the IQueryable by other code, which ...
6
votes
2answers
348 views

Should I create repositories with special functions like getStaffActive()?

I have seen lots of articles but none really help me. That is because I want to use dapper as a DAL. Should I create repositories with special functions? Like getStaffActive()? If I use repositories ...
7
votes
4answers
2k views

Accessing Repositories from Domain

Say we have a task logging system, when a task is logged, the user specifies a category and the task defaults to a status of 'Outstanding'. Assume in this instance that Category and Status have to be ...
3
votes
3answers
2k views

How to use the unit of work and repository patterns in a service oriented enviroment

I've created an application framework using the unit of work and repository patterns for it's data layer. Data consumer layers such as presentation depend on the data layer design. For example a CRUD ...
14
votes
2answers
5k views

Relationship between Repository and Unit of Work

I am going to implement a repository, and I would like to use the UOW pattern since the consumer of the repository could do several operations, and I want to commit them at once. After read several ...
8
votes
1answer
3k views

Hooking up a Business Layer and Repository using Unit of Work Pattern

I am having a bit of trouble explaining precisely the question I have here so bear with me. it is similar to the unanswered question found here: ...