
Compare minimal api with a standard api by showing how minimal api uses a single program.cs and lacks controllers, map controllers, and services add controllers, with no authorization by default.
Explore api basics, including what is a request, what is a response, and the core http verbs such as post, put, batch, and delete, laying the fundamentals for minimal api.
Design minimal api endpoints in .NET Core that return multiple result types using Results, handle exceptions, and explicitly specify status codes like 200 and 400.
Define and validate route parameters in a minimal api by passing an id through the route and enforce the id as an integer, returning 404 on mismatch.
Learn to convert a categories retrieval endpoint into an asynchronous endpoint by adding the async keyword and using await with the application DB context.
Create a category via a post endpoint that accepts a category object from the request body, automatically sets the added date, saves changes asynchronously, and returns the created category.
Enforce basic validation on a minimal api post endpoint by requiring a non-null category name and returning a bad request when missing, and introduce data annotations in dotnet 10.
Explore injecting multiple dependencies in minimal API with .NET Core, including db context and a logger, and follow best practices for route or query parameters, body, and service injection order.
Move category endpoints into a dedicated endpoints file and expose them via an extension on the endpoint route builder. Update program.cs to register the extension and run the app.
Implement update and delete category endpoints in a minimal API using route IDs, a category update DTO, automapper, and EF Core, returning 200 on success or 404 when not found.
Standardize .NET minimal APIs with a single API response type across endpoints, using 200, 201, 404, and 400 status codes, and expose category data only through a DTO.
Fixes the delete endpoint by ensuring an ID is supplied, tests deletions with IDs 4 and 6, and confirms the database reflects the deletions, with 200 responses.
define login and registration endpoints with request and response DTOs, including login request DTO, registration request DTO, and login response DTO that returns a JWT token and default customer role.
Enable authentication and authorization for the minimal API by applying require authorization at the group level and wiring authentication before authorization with jwt bearer tokens validated by a symmetric key.
The lecture demonstrates implementing role based authorization in minimal API by securing create and delete category endpoints to admin only, while customers can read, using required role and tokens.
Practice building a minimal api for menu items with full CRUD, including db migration, dto mapping, and seeding, while postponing image upload and removing authorization.
Implement a minimal api file upload by creating www root/images and enabling static files. Use IFormFile in a dedicated endpoint, rename the image to the item id, and save it.
Implement an async save image file function with extension validation, save to wwwroot/images/menu items, replace existing files, and return a three-part result for a minimal API endpoint.
Explore uploading an image in a minimal .NET core api by refining the post endpoint to include an id and an image route, then test with multipart form data.
Implement versioning by creating v1 and v2 endpoints for categories and menu items, update namespaces to v2, and expose get endpoints with dummy v2 data.
Set up and consume a version set in minimal APIs by linking route groups to an API version set, enabling version validation and routing to version 2 across endpoints.
Explore versioning in action within a minimal API, enabling a dropdown in the scalar API reference to switch between v1 and v2 OpenAPI documents via the API version description provider.
API has been there since a very long time but microsoft has recelty introduced something new "MINIMAL API"
Minimal API is a short form of standard API and there are very good reasons on why you should learn it and why it would be preffered over API in some scenarios.
In this video we will explore everything about Minimal API, as we first answer the big question "WHY MINIMAL API?"
By the end of this course, you will be able to build a endpoints with minimal API by yourself, make GET, POST, PUT and DELETE HTTP Requests with a well-built repository pattern in .NET Core.
What are the requirements?
3-6 months knowledge of ASP.NET Core.
Visual Studio 2022
SQL Server Management Studio
.NET 7
All source codes and exercise solutions of this course are also available on Github and you can find details in the lecture "PROJECT RESOURCES", of course.
I always strive to keep content latest and with top quality content! You will start from ground zero and build a complete API with advance concepts like authorization, authentication, filters and much more!
This will be a hands on course with programming, so lets get started and learn the new and exciting world of Minimal API.