Should I create repositories with special functions like getStaffActive()?
- by Parhs
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
I can implement with dapper-extension a generic crud
I have no idea how to handle database connection. Where to open the connection? If I do this at every function then how am I supposed to use transaction scope?
Somehow the repositories I work with should share a connection in order transaction to work. But how to do this? Openning connection in BLL?
If I use queries and execute them directly then still the same thing.