Skip to content
Learn at your own pace

Learn ASP.NET

Build web APIs and sites with ASP.NET Core: routing, validation, EF Core data access, security, testing and deployment.

Students assemble a modular house from reusable pieces, alongside a laptop showing the same structure.
Build something bigger from reusable parts.
24lessons in 6 stages
48practice exercises
24project milestones
96quiz questions
96review cards

A clear place to start

ASP.NET Core is the .NET framework for web applications and APIs. It receives HTTP requests, runs middleware, and invokes endpoints that return responses.

What you need first

First learn C# methods, classes, interfaces, collections, and async/await. Know basic HTTP methods and status codes, and have the .NET SDK available.

Start with these ideas

  1. Trace a request through middleware to one endpoint. Order matters when later steps depend on earlier work.
  2. Dependency injection supplies a service to its caller. Service lifetimes determine when instances are created and reused.
  3. Authentication identifies the user. Authorization checks whether that user can access the requested resource.

Connect it to a real project

Build a school-library API with validated input, database records, ownership checks, integration tests, and operational health information.

Study one concept at a time. Explain its everyday example in your own words, predict the worked example’s result, then try a small change. Use practice and quiz feedback to decide what to revisit. You can spread a lesson across several study sessions.

Set up your environment Tools, setup steps, and completion requirements

Start with the ideas above, then set up the tools below. Return to the starter example whenever a new term feels unfamiliar.

text
dotnet --version
dotnet new webapi -n LessonApi
cd LessonApi
dotnet run
# Trust the local HTTPS development certificate once: dotnet dev-certs https --trust
# Tests: dotnet new xunit -n LessonApi.Tests, then add Microsoft.AspNetCore.Mvc.Testing

A free account saves your progress, notes, exercise evidence and spaced review cards. To complete a lesson, score at least 80% on its quiz, finish both exercises and the project checklist, and submit your project link with a reflection. Project evidence is self-reported; use the final portfolio rubrics to seek an independent code review.

Your ASP.NET learning path

Work through these foundations in order, then bring them together in a project.

24 of 24 lessons · follow the stages in order

Start with a small example

Put this in Program.cs of a project created with dotnet new web and run dotnet run. Visiting /hello/Developer returns a JSON greeting.

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapGet("/hello/{name}", (string name) =>
    Results.Ok(new { message = $"Hello, {name}!" }));

app.Run();

Try it yourself

Return a 400 problem details response when the name is longer than 50 characters, and add an integration test for both cases.

Put it into practice

Build a bookmarks API

Create a small API that stores bookmarks for signed-in users.

  1. Model bookmarks with EF Core and create the table with a migration.
  2. Add list, create and delete endpoints with validated request DTOs.
  3. Require authentication and let users see only their own bookmarks.
  4. Write integration tests for success, invalid input and access to another user’s bookmark.
Keep exploring

Find your next course

Choose a language, build on it with a framework, or explore AI and search.

Showing 6 of 17 courses