.NET Core (now .NET 5/6+) is a cross-platform, high-performance framework for web development.
🏗️ ASP.NET Core Web Apps
- MVC: Model-View-Controller, for full-featured web apps.
- Razor Pages: Page-centric, lightweight alternative.
- Web API: RESTful APIs for SPA/mobile clients.
🚀 Create a Web App
1
2
3
dotnet new mvc -n MyWebApp
cd MyWebApp
dotnet run
Visit https://localhost:5001
in your browser.
🛠️ Project Structure
Controllers/
– business logic and endpointsViews/
– HTML templates (Razor)Models/
– Data objects
🔑 Middleware
- Add features like authentication, logging, error handling.
- Configure in
Startup.cs
withapp.UseXyz()
.
🌍 Hosting
- Deploy to IIS, Azure, Linux, Docker, etc.
Next: Structuring projects with .NET Core!