© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3mo ago•
27 replies
AlisterKB

Repository Pattern. EFCore. Single Responsibility (how much of it?)

https://paste.mod.gg/udwfheejnznx/0
here is the example of my 2 controller endpoints. there are 2 regions(#region IThinkISuccessfullyShovedToRepoitory AND #region IDonnoHowToShoveToRepos) in it 1 I think i have managed to cleanly convert, otherwise directly calling dbcontext in controller, to use repository. and 2nd region that I can't figure how much of what should go to each repo.
So I understand that each repo should ideally be only using its own respective context (
BlogRepo
BlogRepo
only call
context.Blogs
context.Blogs
), but to what end? 100% is it a cardinal sin to include like and utlize
context.Tags
context.Tags
in
BlogRepo
BlogRepo
?
BlazeBin - udwfheejnznx
A tool for sharing your source code with the world!
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

❔ Repository pattern
C#CC# / help
3y ago
✅ Repository Pattern question.
C#CC# / help
3y ago
❔ is Generic Repository a bad implementation of Repository Pattern?
C#CC# / help
4y ago
❔ EFCore finding a single entry
C#CC# / help
3y ago