Create a Minimal Web API With ASP.NET Core and Publish To Azure API Management With Visual Studio

Minimal Web API is a new approach for building APIs without all the complex structures of MVC, so, in accordance with the name "minimal," it includes the essential components needed to build HTTP APIs. All that you need is only a CSPROJ and a Program.cs.

Benefits of Using Minimal Web API

  • Less complex than before
  • Easy to learn and use
  • Don’t need an MVC structure: no controllers!
  • Minimal code to build and compile the application, which means the application runs much faster (better performance)
  • Latest improvements and functionalities of .NET 6 and C#10

Prerequisites

  • .NET 6 SDK
  • Visual Studio 2022 or Visual Studio Code (we will use both of them)

We will use two methods to create our Minimal Web API.

How to Mock a Web Server in Your Java Applications

When you need to test an application that consumes a web API, you basically have two options:

  1. Use Testcontainers to start a container that will run the web API which your application will consume.
  2. Mock a Web Server to emulate the web API which your application will consume.

Many times, starting a container for that is not an option. For instance: you might not have a container environment available, or you just don’t have the artifacts to create that container (it might be a 3rd part API), or it is hard to emulate the needed behavior with containers.

Working With dotConnect for SQL Server in ASP.NET Core

dotConnect for SQL Server is a fast ORM for SQL Server from Devart that is built on top of ADO.NET and provides you an opportunity to connect to SQL Server databases from .NET or .NET Core applications. dotConnect for SqlServer, earlier known as SQLDirect.NET, is a fast, scalable data access framework that can be used in WinForms, ASP.NET, etc. This article talks about the features and benefits of dotConnect for Sql Server and how we can work with it in ASP.NET Core.

Prerequisites

To be able to work with the code examples demonstrated in this article, you should have the following installed in your system:

Tutorial Part 2: How to Build a Progressive Selfies Web App with JavaScript

If you're looking to build a powerful PWA that takes advantage of the hardware on a device, things are only going to get better. In my previous post, I explained the fundamental concepts of PWA. In this article, I will discuss some PWA features that provide access to your hardware APIs:

Requirements

To start with this tutorial you must install the following:

Create a Cascading Dropdown in ReactJS

Introduction

In this article, we will learn how to create a cascading dropdown using ReactJS and Web API. A cascading dropdown is a group of dropdowns where the value of one dropdown depends upon another dropdown value. Child dropdown values are populated based on the item selected in the parent dropdown.

Prerequisites

  • We should have basic knowledge of React.js and Web API.
  • Visual Studio and Visual Studio Code IDE should be installed on your system.
  • SQL Server Management Studio.
  • Basic knowledge of Bootstrap and HTML.
You may also like: Everything React: Tutorials for Beginners and Experts Alike.

Create a Table in the Database

Open SQL Server Management Studio, create a database named "CascadingDemo", and in this database, create three tables and some demo data in the tables:

Server Side Pagination Using ASP.NET Core And Angular 8 – Part Two

Introduction

In this article, we will learn how we create server-side pagination, which is very useful whenever we need to display a large number of records. This is the second part of my article on server-side pagination, you can check out the first part of this article from the link below. 

How It Will Work?

In this article, we are going to show previous and next buttons with custom logic so whenever we click on next button it shows the next page of records. For example, suppose we are on page one and after clicking on next, it would show the second page of records. However, here we will see different logic. 

Backend

Here in the previous article we have already created database and tables so there's no need to create it again. If you don't have the related database, tables, and stored procedure, then please check the previous article

Web API

Complete code of pagination controller:   

How to Publish ASP.NET Core 3.0 Web Apps/APIs in Azure’s Linux App Service

Create a new App Service Plan. If you have already created then skip this step. An app service is like one container or a VM machine. In a single Azure app service, you can host N number of web apps. Based on load, you can split your apps to separate app services if required.

To create a new app service, you'll first need to set a resource group name; if you already have created it, you can use the same or else can create new. Next, fill the app service name, select Linux as your OS, select a pricing plan based on your needs, and hit create.