
Learn what minimal APIs are and how to create endpoints with minimal dependencies, enabling a clean to-do app with sql server integration, login, authorization, authentication, and unit testing.
Learn the prerequisites for mastering minimal APIs in .NET 10, including C# fundamentals, RESTful API concepts, DI, EF Core, login and authentication, and Visual Studio basics.
Install visual studio and the dotnet 10 sdk, set up sql server tools, then clone the repository with git and test the localdb connection.
Create the Web API project in Visual Studio, configure the csproj root namespace and assembly name, enable Swagger, and set up application and infrastructure libraries with project references.
Install and configure EF Core in the infrastructure project by adding four NuGet packages, create ToDoDbContext, and register it with dependency injection using the ToDoDbContext connection string from appSettings.Development.json.
Create the ToDoTask entity in the infrastructure data layer with Id, Task, Created, and Deleted properties, configure its key and max length 1000, map to ToDoTasks, and register via OnModelCreating.
Create and apply an EF Core migration to generate the ToDoTasks table and database, fix PrivateAssets tag on the design package, and verify the migration in SQL Server Object Explorer.
Create an EF Core repository for a to-do task by defining CreateToDoTaskDto and ToDoTask entity, adding ToDoTasks DbSet, implementing the repository, and registering it for dependency injection to persist changes.
Create a business layer service by defining iTodoTaskService and its TodoTaskService, injecting iTodoTaskRepository and implementing a create method that accepts createTodoTaskDto, then register via AddApplicationServices in Program.cs.
Create a minimal api post endpoint in a dedicated endpoints class to add a todo task at /api/to-do-tasks, with data annotations validation (required, minLength 50, maxLength 1000) and 201 created.
Implement a get read endpoint in a minimal API to fetch a to-do using EF Core, projecting id, task, and created into a DTO with 200, 404, and 500 responses.
Implement a put update endpoint in a minimal API to update a todo task using a dedicated updateTodoTaskDTO, repository, and service, with EF Core persistence and proper status responses.
Learn to implement a delete endpoint in an ASP.NET Core minimal API, using soft deletion by setting the deleted property to UTC time, with 204, 404, and 500 responses.
Implement a listing endpoint by creating the TodoTaskListingDTO and TodoTaskListingResultDTO, and wiring repository and service methods to paginate results using page and pageSize with 10 or 20 options.
Implement an api get listing endpoint for to-do tasks using a listing dto with page and page size, returning ok with results or notFound, and enable strict json number handling.
Learn to use an endpoint filter with feature flags in minimal APIs. Implement a ToDoTask filter, wire it to IFeatureManager, and enable via appsettings and feature management.
Install siri log for minimal APIs by adding NuGet packages, configure in configure-services.cs and program.cs, and enable console and file sinks with daily rolling logs and timestamped output in appsettings.development.json.
Inject a logger factory to create a logger for the static todoTaskEndpoints class and log debug messages in the get method; enable Serilog at debug for todo.api.endpoints.
Learn to write error level logs that capture exceptions in a minimal API using a try-catch with logger.logError, including the exception and user agent from HTTP context.
Implement a global exception handler in ASP.NET Core to catch unhandled exceptions, return a standardized problem details response with a 500 status, and log errors, with environment-based toggling for development.
Configure authentication for minimal APIs using an API key in the request header, returning 401 if invalid, and bind the key from appsettings.development.json to API options.
Create an api key authentication handler for ASP.NET Core minimal APIs, validating the api-key header and producing a claims identity with the api key scheme.
Register the authentication handler using AddAPIKeyAuthorization and APIKeyPolicy, enable authentication, and require authenticated users on endpoints or the group to return 401 without a key.
Configure Swagger to add an API key to the request header by creating an OpenAPI document transformer and registering it in program.cs, enabling authorized access via the API key.
Create a new xUnit v3 test project to unit test your minimal API endpoints and set up TodoTaskEndpointsTest.cs with Mock, HTTPContext, and NullLoggerFactory.
Learn to write unit tests for a minimal API Get endpoint by mocking TodoTaskService, verifying calls, and testing not found, ok, and internal server error responses.
Learn to add xunit tests for the getlisting endpoint in a dotnet minimal api, including parameterized tests with theory and inline data, and verify ok and not found responses.
Write xUnit tests for create, update, and delete endpoints in an ASP.NET Core minimal API, using mocks to verify service calls and created, not found, and no content responses.
Explore next steps in minimal APIs with ASP.NET Core for complete beginners, reinforce dependency injection, and access free tutorials and code examples on roundthecode.com and the .NET YouTube channel.
Controller-based APIs come with a lot of boilerplate you don't always need. This course shows you how to build the same production-ready API using Minimal APIs instead, with proper structure.
It uses the GET, POST, PUT, and DELETE methods in Minimal APIs to demonstrate how to design clear and expressive HTTP endpoints from the very beginning. You will start with the fundamentals of Minimal APIs, then gradually move toward designing a well-structured solution that follows clean architecture principles. The course emphasises clear separation of concerns so your application remains easy to maintain, test, and extend as requirements grow.
As you progress, you will integrate SQL Server using Entity Framework Core and DbContext, learning how to model data, manage migrations, and perform efficient data access. You will also implement structured logging with Serilog to capture meaningful diagnostics and configure a global exception handler to ensure consistent and reliable error handling across the entire API.
Security is a core theme throughout the course. You will add API key based authentication to protect endpoints, apply an EndpointFilter that uses feature flags, and write comprehensive unit tests using xUnit v3 to validate business logic and ensure long term stability. Swagger is used extensively for testing, documentation, and exploration of the API, giving you confidence in every endpoint you build and helping you follow modern .NET best practices from start to finish.