16 lines
780 B
Markdown
16 lines
780 B
Markdown
# MVC-SimpleCRUD-Layered
|
|
|
|
This solution keeps the behavior of `MVC-SimpleCRUD`, but separates the code into a simple layered architecture:
|
|
|
|
- `MVC-SimpleCRUD-Layered.Web` contains controllers, Razor views, tag helpers, static files, and UI concerns.
|
|
- `MVC-SimpleCRUD-Layered.Application` contains application models and the `IPeopleService` / `PeopleService` use-case logic.
|
|
- `MVC-SimpleCRUD-Layered.Data` contains EF Core generated models and `EventsContext` implementations.
|
|
|
|
Request flow:
|
|
|
|
```text
|
|
Browser -> PeopleController -> IPeopleService -> EventsContext -> Database
|
|
```
|
|
|
|
The main teaching contrast is that controllers no longer use `EventsContext` directly. They receive HTTP input, handle MVC concerns, and delegate the person CRUD workflow to the application layer.
|