1. Project Structure & Fundamentals
ASP.NET Core Fundamentals & Project Structure - Complete Guide
Practical Guide + Technical Reference
📋 Table of Contents
Part 1: Practical Guide (Hands-On)
Part 2: Technical Reference (Deep Dive)
PART 1: PRACTICAL GUIDE
1. What is ASP.NET Core?
Key Benefits
.NET Evolution Timeline
.NET Framework vs .NET Core vs .NET 5+
Feature
.NET Framework
.NET Core
.NET 5+
When to Use ASP.NET Core
2. Getting Started - 3 Ways to Create a Project
Method 1: Visual Studio (Beginner-Friendly)
Method 2: .NET CLI (Recommended for Professionals)
Method 3: VS Code (Lightweight)
Template Comparison
Template
Use Case
Complexity
Output
3. Project Structure Deep Dive
Complete Folder Structure (Web API Project)
Program.cs - The Entry Point
Aspect
Minimal (.NET 6+)
Legacy (Pre-.NET 6)
appsettings.json - Configuration
Environment-Specific Configuration
Reading Configuration (3 Methods)
wwwroot/ - Static Files
.csproj - Project File
Element
Purpose
Example
Adding NuGet Packages (3 Methods)
Folder Conventions (Best Practices)
4. .NET CLI Commands Reference
Essential Commands
Command
Purpose
Example
Project Management
Package Management
Build & Run
Publishing
Entity Framework Core Commands
Development Helpers
5. Application Startup Lifecycle
Visual Flow Diagram
Detailed Startup Code
Builder Phase vs App Phase
Phase
Purpose
Examples
6. Environments
What are Environments?
Setting the Environment
Environment-Specific Configuration Files
Checking Environment in Code
IWebHostEnvironment / IHostEnvironment
User Secrets (Development Only)
7. Troubleshooting Common Issues
Issue 1: Port Already in Use
Issue 2: HTTPS Certificate Not Trusted
Issue 3: Package Restore Failed
Issue 4: Startup Class Not Found (Pre-.NET 6)
Issue 5: Configuration Not Loading
Issue 6: Services Not Resolving
8. Best Practices
✅ Project Structure
✅ Configuration
✅ Dependency Injection
✅ Security
✅ Performance
✅ Logging
✅ Error Handling
✅ Code Quality
PART 2: TECHNICAL REFERENCE
9. Important Classes & Interfaces Reference
WebApplication Class
Property
Type
Description
Method
Return Type
Description
WebApplicationBuilder Class
Property
Type
Description
Method
Return Type
Description
IWebHostEnvironment Interface
Property
Type
Description
Method
Description
IConfiguration Interface
Method
Description
Method
Description
ConfigurationManager Class ✨ .NET 6.0+
Method
Return Type
Description
IServiceCollection Interface
Method
Description
IServiceProvider Interface
Method
Description
10. Configuration System Deep-Dive
Configuration Sources
Adding Custom Configuration Sources
Configuration Providers
Provider
Package
Usage
Strongly-Typed Configuration (IOptions)
IOptions Comparison Table
Configuration Binding
Configuration Validation ✨ .NET 6.0+
11. Hosting Models Details
Kestrel (Cross-Platform Web Server)
IIS Integration (Windows)
Reverse Proxy Patterns
12. Advanced Topics
Custom Application Lifetime Events
Generic Host vs Web Host
Background Services
Minimal APIs ✨ .NET 6.0+
Performance Tips
Summary: Complete Fundamentals Checklist
✅ Getting Started
✅ Project Structure
✅ Configuration
✅ Dependency Injection
✅ Environments
✅ Best Practices
Last updated