So I'm trying to set up all the basics for a new .NET application. It's a Blazor app, to be created with clean architecture and code-first EF Core.
In my domain layer I defined some entities which will be used be EF Core to generate the database. And in the presentation/WebUI layer I created a folder for models that I can give to the razor files. The original idea was to map directly from the entities to the models when I'm retrieving the data.
When creating the interfaces for my services in the application layer I realized that the application layer is not supposed to have access to the presentation layer. Therefore I cannot have an interface like Task<SomeModel> GetSomeModelByIdAsync(int id);. I would have to return the entity but I don't want that sent all the way out to the outer layer right?
What would be the correct way of handling this. Do I move my models to the application layer, or do I create DTOs that the presentation layer can map to the models? It's only a hobby project so I'm fine by taking my time and getting things better than they have to be. Yes I'm probably overthinking it, what fun would it be otherwise?