Skip to main content

One post tagged with "TOP-LEVEL-STATEMENTS"

View All Tags

Single-file web API services with .NET 5 and ASP.NET Core

· 4 min read

Introduction

There are many ways to create a web application today. We have a lot of different platforms, frameworks, and libraries: PHP, Python, Java, NodeJS, and a dozen of others.

While ASP.NET (Core) was always a good choice for developing enterprise-level web applications (with many complex web pages, some Web API endpoints, static resources, etc.), it's never been the best choice for creating a small web service with just a few endpoints to handle REST API requests in JSON or plain text formats.

Well, that was true until .NET 5 was released last year. With support for top-level statements and new features in C# language, .NET 5 allows us to create a solid web service in just a few minutes and with a single code file.

Adaptive CRUD for ASP.NET Core web apps. 10 minutes to set up. Open-source!