
This course guides you to build a minimal api from scratch in dot net, with step-by-step practice, using entity framework, dependency injection, dto, and basic get, put, delete operations.
Explore the eCampusConnect minimal web API for courses, exposing collection endpoints for get and post and item endpoints for get, put, and delete, all backed by an in-memory store.
Explore the fundamentals of minimal API, its purpose and characteristics, compare it with controllers, verify prerequisites, create a new project, and learn the map method.
Explore what minimal APIs are in Darknet Core six by Microsoft, emphasizing minimal dependencies and a single-file implementation, and compare controller-based MVC with the new minimal API approach.
Discover why minimal APIs lower entry barriers for beginners, reduce boilerplate, and enable quick, dependency-light web services ideal for microservices and rapid proofs of concept.
Compare minimal APIs and controller APIs, noting feature sets, evolving structure, and when to choose lightweight minimal APIs for simple apps versus fuller controller-based APIs.
Check the prerequisites to start building a minimal API, including choosing Visual Studio or Visual Studio Code, installing the .NET 6 SDK, and adding C# and NuGet Package Manager extensions.
Create a web project with minimal API approach using dotnet in Visual Studio Code, explore top level statements and global using statements, then build and run to expose API endpoints.
Learn how to use the map methods in a minimal api to expose routes like get, post, delete, and put, with inline or external delegates.
Discover how to expose a courses endpoint with Minimal API, build an in-memory collection and data model, and implement the get operation to fetch all courses with dependency injection.
Expose /courses endpoint with a get operation to fetch all courses using map.get in a .NET minimal API, and verify the API with Postman.
Define a data model class named course to represent a college course table, with id, name, duration, and type properties, laying groundwork for mapping in the web api.
Create a database context class to expose and map data access using Entity Framework, supporting in-memory collections or SQL Server stores, and configure its options and DbSet properties.
Learn to wire up dependency injection in a dotnet minimal api by registering the database context in the service collection, configuring in-memory options, and enabling endpoint access to the context.
Implement a get operation in a minimal API to fetch all items by injecting the database context into the map get method, retrieving the course list from the in-memory store.
Explore returning results in .NET minimal API by inspecting return types across map methods, updating the get endpoint to use the results, and converting to asynchronous operations.
Discover how minimal API returns results with the IResult contract and the Results factory, using status helpers like ok, not found, bad request, and no content.
update the get operation to use results, store in a temporary variable, then return the result with http 200, and demonstrate handling 400 bad requests via postman.
Learn how to convert map get operations to asynchronous processing using async/await to return results without blocking, improving performance for web apps and enterprise applications.
Convert the map get method to asynchronous in a .NET minimal API by adding async and using await for the costly operation with proper asynchronous list methods.
Enhance a .NET minimal API by implementing the post operation to add items, using AutoMapper for data and input models, and applying attributes and error handling.
Implement the post operation to add a new course using map post, with dependency injection for the database context, save changes, and return a created response containing the new course.
Step 11 introduces digital models (input DTOs) to replace data models for post and get operations, exposing a subset of properties and reducing payload size.
Learn how to use AutoMapper to map between data models and input models in a .NET minimal API, configure profiles, register services, and streamline map operations.
Apply AutoMapper in map post method by injecting the mapper, convert the input model to the data model, persist with EF, then map back and ensure enum values are strings.
Learn how attributes in map methods clarify data sources in a .NET minimal API. Use from body and from services to pull values explicitly, while .NET often infers them.
Step 14 teaches handling exceptions in minimal APIs by wrapping map and get methods in try-catch blocks, using results for status codes, and employing problems to return detailed error information.
Explore implementing single-item endpoints in a minimal .NET API, covering get, put, and delete operations, with steps to fetch, update, and remove individual items.
Implement the get operation to fetch a single item by its id using routing /courses/{id}, validate existence, map the data model, and return the result or not found.
Implement a put operation to update an existing item using Map Put, reusing get and post logic, validating existence, updating fields, saving via db context, and returning the updated item.
Implement a delete operation for an existing item in a .NET minimal API by reusing the map delete flow, validating existence, and removing by the primary key (course id).
Celebrate completing the course by applying the newly learned concepts at work, and review the course to help future students decide to enroll; feel free to message with questions.
Minimal API is a new feature in .NET 6 that helps you develop APIs quickly. ASP.NET Web API is one of the hot topics in the web development space. The usage of Web API has increased exponentially in the development circle. Companies such as Netflix, Spotify, Tesla, and Amazon use APIs to connect front-end and back-end functionality at a large scale. You will be learning to build Minimal API from scratch in this course.
Instructor Bio:
Praveen is an experienced product designer and developer who has worked for 10 years at Honeywell and 7 years at Bosch. He specializes in building products on the .NET stack and cloud platforms. He has a patent and has presented two papers. Additionally, he has published 20+ Courses and 50+ Hands-On Labs on Kubernetes, Docker & Azure, teaching thousands of students on various cloud-native topics.
Topics Covered In This Course:
Get started with Minimal APIs, including what minimal APIs are, their needs, when to use them, etc.
Differences and similarities between Minimal APIs and MVC APIs.
Implement collection API using EntityFramework and Dependency Injection.
Improve your Minimal API through Data Transfer Objects (DTO), AutoMapper, and handling exceptions.
Implementing individual item endpoints such as GET, PUT, and DELETE.
Many downloadable resources and practice activities.
At The End Of This Course:
You will know how to create a Minimal Web API using .NET Core.
Enroll now to get started.