© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
11 replies
BLANK

Clean Architecture

I'm trying to implement Clean Architecture in my web api, I'm also using the generic repository and unit of work pattern. I want to set my unit of work up as a singleton, but my Program.cs exists in my 'Presentation' (web) layer. This means it wants a reference to my Infrastructure layer (where my unit of work lives) which breaks clean architecture.

Can I and should I move Program.cs to a different layer? Any Suggestions
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Clean Architecture
C#CC# / help
17mo ago
Solution Clean Architecture
C#CC# / help
7mo ago
Help with clean architecture
C#CC# / help
5mo ago
✅ Auth in Clean Architecture
C#CC# / help
8mo ago