♫musicjinni

Cleaning Up The Program.cs File In .NET 6 Now That Startup.cs is Gone

video thumbnail
With ASP.NET Core in .NET 6, we lost the Startup.cs file. All of that functionality was moved into the Program.cs file, and while it was consolidated, the Program file can get quite large. In this video, we will look at techniques to keep the Program.cs file clean and focused. We will use a Minimal API since that project type is the worst offender here, but these techniques will apply to all ASP.NET Core project types, as well as to other projects in the C# ecosystem.

Full Training Courses: https://IAmTimCorey.com
Source Code: https://leadmagnets.app/?Resource=ProgramCleanup

Mailing List: https://signup.iamtimcorey.com/

0:00 - Intro
1:18 - Getting Started: Creating ApiDemo(ASP.NET Core Web API)
3:12 - Program.cs
4:32 - Services(Dependency Injection)
5:01 - Swagger
5:58 - Minimal APIs actions(Endpoints)
8:15 - Refactor Services(Dependency Injection)
14:39 - Refactor Swagger
17:14 - Refactor Minimal APIs(Endpoints)
22:14 - Cleaning up MS Sample code
22:54 - Recap

Intro to Console Apps in C# in .NET 6

Dependency Injection in .NET Core (.NET 6)

C# Full Course : C# Tutorial for Beginners

Writing C# in VS Code Is Finally Awesome!

.NET 8 and C# 12 Launch - What is New, What is Improved, and What is Supported

Intro to Blazor in .NET 8 - SSR, Stream Rendering, Auto, and more...

How to CALL POST API in C#! - THIS EASY!

.NET 6 Startup Changes - Handling Program.cs Without Startup.cs

Why Startups Hate .NET and C#

Working with Null in .NET 6 and C# 10

Intro To RabbitMQ

Blazor WebAssembly & Web API on .NET 6 – Full Course (C#)

Create DROPDOWNS in ASP.NET Core using DropDownList and GetEnumSelectList!

The Perfect C# Console Application...Or Not.

ASP.NET 6 BACKGROUND WORKER SERVICES - What you need to know and how to setup one.

C# Code Review: Reviewing Practice Code - How To Practice C# Well

How to Create a Windows Service Using C# and Visual Studio!

C# Namespace & Using Deep Dive - Including .NET 6 Changes

Intro to SignalR in C# Part 1 - using Blazor, WPF, best practices, and more

.NET MAUI Tooling Released to Production in Visual Studio 17.3

Intro To Class Libraries in C#

My 30+ Tweaks to Visual Studio 2022 - Make VS Work For You

Visual Studio 2022 Preview 1 Sneak Peek

Send Emails in C# and ASP.NET Core! - It´s actually pretty SIMPLE!

How to create Identity Pages in ASP.NET MVC Applications - Create the register and login page

Intro to Service, Unit Testing, Class Library, and SSDT Projects in VS2022

C# multithreading 🧶

C# Logging In 100 seconds

Humanize Your C# Code with the Humanizer NuGet Package

.NET 6 Hot Reload Controversy Explained

Disclaimer DMCA