© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•8mo ago•
14 replies
Nikolas

✅ Is there any benefit to separating your service models and repository entities?

I'm writing a C# ASP.NET application using the Repository pattern, and I recently asked in #help-0 about whether I needed separate models for the controller, service, and repository layer, and someone mentioned to me that I probably didn't need to separate the service model and the repository entity since I didn't have any purpose. I tried to think of why it I should, but I couldn't think of anything other than "It's best practice", especially considering my repository entities don't contain anything specific to the database. Is there any particular reason on why I should separate them that I'm missing?

Thank you!
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

any benefit to async?
C#CC# / help
4y ago
Entities and Models, DTOs oh my?
C#CC# / help
4y ago
Is there any benefit to write a Property with a private variable ?
C#CC# / help
4y ago
Clean architecture and EF entities as domain models
C#CC# / help
3y ago