
Your /Models folder is lying to you
We've been trained to separate our POCOs into a neat folder. I'm here to tell you that folder is making your codebase harder to understand, not easier. Open any .NET solution made by a developer who learned "clean architecture" from a blog post and you'll find it. The Models/ folder. Or maybe it's called DTOs/ , or Entities/ , or ViewModels/ . Inside: 40, 50, sometimes 80 files. A graveyard of classes, half of which you have no idea whether anyone still uses. This pattern is so common it's treated as a given. And I think it's quietly making our code worse. The promise vs. the reality The idea sounds reasonable: keep all your data classes in one place so they're easy to find. But what you actually get is a folder full of context-free classes with zero indication of where they belong or what they're for. When you open UserSummaryDto.cs , do you know which service uses it? Which endpoint returns it? Whether it's still alive? You don't — you have to go hunting. The folder doesn't organize
Continue reading on Dev.to
Opens in a new tab




