ASP.NET
Microsoft's web framework for building APIs and web apps on .NET.
CurrentintermediateGuide only -- no course yet
Overview
ASP.NET (specifically ASP.NET Core, the current cross-platform version) is Microsoft's framework for building web APIs and applications in C#, with strong performance, built-in dependency injection, and tight integration with the rest of the .NET ecosystem.
- What it is
- A cross-platform web framework for building APIs and web applications with C# and .NET.
- Why it's used
- For high-performance, strongly-typed web backends, especially in organizations already invested in the .NET/C# ecosystem.
- Where it fits
- Built on .NET and C#; a common enterprise backend choice alongside SQL Server or PostgreSQL.
Core concepts
- Controllers and routing
- Dependency injection
- Middleware pipeline
- Model binding and validation
Example
Attributes ([ApiController], [HttpGet]) declaratively configure routing -- ASP.NET Core wires the HTTP request to this method based on the attributes, not a separate routes file.
[ApiController]
[Route("api/[controller]")]
public class UsersController : ControllerBase {
[HttpGet("{id}")]
public IActionResult Get(int id) => Ok(new { Id = id });
}Common use cases
- Enterprise web APIs
- .NET-based microservices
- Internal business applications
Project ideas
- A REST API with a couple of endpoints backed by an in-memory list