Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Minimal APIs in ASP.NET Core

You're reading from   Mastering Minimal APIs in ASP.NET Core Build, test, and prototype web APIs quickly using .NET and C#

Arrow left icon
Product type Paperback
Published in Oct 2022
Publisher Packt
ISBN-13 9781803237824
Length 240 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Marco Minerva Marco Minerva
Author Profile Icon Marco Minerva
Marco Minerva
Emanuele Bartolesi Emanuele Bartolesi
Author Profile Icon Emanuele Bartolesi
Emanuele Bartolesi
Andrea Tosato Andrea Tosato
Author Profile Icon Andrea Tosato
Andrea Tosato
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Part 1: Introduction
2. Chapter 1: Introduction to Minimal APIs FREE CHAPTER 3. Chapter 2: Exploring Minimal APIs and Their Advantages 4. Chapter 3: Working with Minimal APIs 5. Part 2: What’s New in .NET 6?
6. Chapter 4: Dependency Injection in a Minimal API Project 7. Chapter 5: Using Logging to Identify Errors 8. Chapter 6: Exploring Validation and Mapping 9. Chapter 7: Integration with the Data Access Layer 10. Part 3: Advanced Development and Microservices Concepts
11. Chapter 8: Adding Authentication and Authorization 12. Chapter 9: Leveraging Globalization and Localization 13. Chapter 10: Evaluating and Benchmarking the Performance of Minimal APIs 14. Index 15. Other Books You May Enjoy

A brief history of the Microsoft Web API

A few years ago in 2007, .NET web applications went through an evolution with the introduction of ASP.NET MVC. Since then, .NET has provided native support for the Model-View-Controller pattern that was common in other languages.

Five years later, in 2012, RESTful APIs were the new trend on the internet and .NET responded to this with a new approach for developing APIs, called ASP.NET Web API. It was a significant improvement over Windows Communication Foundation (WCF) because it was easier to develop services for the web. Later, in ASP.NET Core these frameworks were unified under the name ASP.NET Core MVC: one single framework with which to develop web applications and APIs.

In ASP.NET Core MVC applications, the controller is responsible for accepting inputs, orchestrating operations, and at the end, returning a response. A developer can extend the entire pipeline with filters, binding, validation, and much more. It’s a fully featured framework for building modern web applications.

But in the real world, there are also scenarios and use cases where you don’t need all the features of the MVC framework or you have to factor in a constraint on performance. ASP.NET Core implements a lot of middleware that you can remove from or add to your applications at will, but there are a lot of common features that you would need to implement by yourself in this scenario.

At last, ASP.NET Core 6.0 has filled these gaps with minimal APIs.

Now that we have covered a brief history of minimal APIs, we will start creating a new minimal API project in the next section.

You have been reading a chapter from
Mastering Minimal APIs in ASP.NET Core
Published in: Oct 2022
Publisher: Packt
ISBN-13: 9781803237824
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime