Should Controllers Reference Repositories or Services

added by DotNetKicks
9/15/2021 2:09:27 PM

319 Views

A common question students ask when learning about Clean Architecture, SOLID, and/or DDD is whether controllers (or razor pages or API endpoints) should work with repositories directly, or if they should only communicate with services. As with many questions in software, the answer is, "it depends", but I can offer some recommendations.


0 comments