MVC (layered variant)
This commit is contained in:
15
MVC-SimpleCRUD-Layered/README.md
Normal file
15
MVC-SimpleCRUD-Layered/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user