filmov
tv
How to Setup a Minimal API in .NET 7

Показать описание
In this tutorial we'll take a look at how to configure a minimal api in .NET 7. We'll also take a look at the Minimal API filters, added into .NET 7 and how to properly set them up.
👍If you enjoyed this tutorial, please like this video consider subscribing for more content like this!
😮 By the end of this tutorial, you will be able to:
- Setup a Minimal API in .NET 7
- Create Minimal API CRUD endpoints
- Install and configure FluentValidation
- Understand API Filters and how they work
- Configure Minimal API filters for an enterprise level application
🖊 Useful Notes:
Versions used in the recording of this tutorial:
- .NET SDK: 7.0.100-preview.4.22252.9
- .NET Runtime 7.0.0-preview.4.22229.4
- Visual Studio 2022 17.3.0 Preview 1.1
To generate the migration using EF Core Tools, use the following command in your Package Manager Console in Visual Studio:
👉 Add-Migration InitialCreate -c MarketMgrDbContext -o DataAccess/Migrations
To update the database with a generated migration:
👉 Update-Database InitialCreate
📦 Dependencies:
👉 FluentValidation.AspNetCore --version 11.0.2
👉 Microsoft.EntityFrameworkCore.SqlServer --version 7.0.0-preview.4.22229.2
👉 Microsoft.EntityFrameworkCore.Tools –version 7.0.0-preview.4.22229.2
0:00 - Intro
00:30 - Setup a New Minimal Web API
01:30 - Setup and Configure SQL Server Database
04:22 – Create and Apply SQL Server Migrations
05:29 – Create Minimal API Endpoints
09:34 – Setup Fluent Validation
11:51 – Configure Minimal API Endpoints Filters
15:11 – Refactor Route Handler Filters
🥇 Credits:
👍If you enjoyed this tutorial, please like this video consider subscribing for more content like this!
😮 By the end of this tutorial, you will be able to:
- Setup a Minimal API in .NET 7
- Create Minimal API CRUD endpoints
- Install and configure FluentValidation
- Understand API Filters and how they work
- Configure Minimal API filters for an enterprise level application
🖊 Useful Notes:
Versions used in the recording of this tutorial:
- .NET SDK: 7.0.100-preview.4.22252.9
- .NET Runtime 7.0.0-preview.4.22229.4
- Visual Studio 2022 17.3.0 Preview 1.1
To generate the migration using EF Core Tools, use the following command in your Package Manager Console in Visual Studio:
👉 Add-Migration InitialCreate -c MarketMgrDbContext -o DataAccess/Migrations
To update the database with a generated migration:
👉 Update-Database InitialCreate
📦 Dependencies:
👉 FluentValidation.AspNetCore --version 11.0.2
👉 Microsoft.EntityFrameworkCore.SqlServer --version 7.0.0-preview.4.22229.2
👉 Microsoft.EntityFrameworkCore.Tools –version 7.0.0-preview.4.22229.2
0:00 - Intro
00:30 - Setup a New Minimal Web API
01:30 - Setup and Configure SQL Server Database
04:22 – Create and Apply SQL Server Migrations
05:29 – Create Minimal API Endpoints
09:34 – Setup Fluent Validation
11:51 – Configure Minimal API Endpoints Filters
15:11 – Refactor Route Handler Filters
🥇 Credits:
Комментарии