How harsha-global/aspnetcore-harsha works
This repository is a chapter-by-chapter collection of ASP.NET Core teaching examples, not one deployable application. Its representative web workflow is an HTTP request handled through middleware and routing, then an endpoint/controller produces a response or rendered view. The tree also documents substantial lessons on model binding and validation, Razor composition, dependency injection, logging, filters, and identity/authorization. Most application source was not sampled, and the README only identifies the repository as source code, so workflow links below are dashed and unverified rather than asserted as observed calls.
Main entry points: MyFirstApp/Program.cs HTTP basics · MiddlewareExample/Program.cs Middleware · RoutingExample/Program.cs Endpoint routing · HomeController.cs MVC controllers
Components 18
Web fundamentals
- HTTP basics
02. HTTP/03. HTTP Request/MyFirstApp/Program.cs - Middleware
03. Middleware/03. Custom Middleware Class/MiddlewareExample/Program.cs - Endpoint routing
04. Routing/02. Map, MapGet, MapPost/RoutingExample/Program.cs - Static files
04. Routing/11. WebRoot and UseStaticFiles/RoutingExample/Program.cs
MVC and views
- MVC controllers
05. Controllers & IActionResult/01. Creating Controllers/ControllersExample/Controllers/HomeController.cs - Action results
05. Controllers & IActionResult/05. IActionResult/IActionResultExample/Controllers/HomeController.cs - Model binding
06. Model Binding and Validations/14. Custom Model Binders/ModelValidationsExample/CustomModelBinders/PersonModelBinder.cs - Model validation
06. Model Binding and Validations/09. Custom Validation with Multiple Properties/ModelValidationsExample/CustomValidators/DateRangeValidatorAttribute.cs - Razor views
07. Razor Views/12. Strongly Typed Views/ViewsExample/Controllers/HomeController.cs - View layouts
08. Layout Views/01. Creating Layout Views/LayoutViewsExample/Controllers/HomeController.cs - Partial views
09. Partial Views/01. Creating Partial Views/PartialViewsExample/Controllers/HomeController.cs
Application services
- Dependency injection
11. Dependency Injection/01. Services/DIExample/Program.cs - Logging
19. Logging/01. ILogger/CRUDTests/PersonsControllerTest.cs - MVC filters
20. Filters/01. Action Filter/CRUDTests/PersonsControllerTest.cs
Identity and security
- Identity and roles
24. Identity and Authorization/14. User Roles/ContactsManager.ControllerTests/PersonsControllerTest.cs - Authorization policies
24. Identity and Authorization/17. Custom Authorization Policies/ContactsManager.ControllerTests/PersonsControllerTest.cs - XSRF protection
24. Identity and Authorization/19. XSRF/ContactsManager.ControllerTests/PersonsControllerTest.cs
Other components
- HTTP client
Connections 6
- HTTP client → HTTP basics: sends request
- HTTP basics → Middleware: enters pipeline
- Middleware → Endpoint routing: reaches endpoints
- Endpoint routing → MVC controllers: selects endpoint
- MVC controllers → Action results: returns result
- Action results → HTTP client: sends response