Where is Startup class? | .NET 6 | Getting Started With ASP.NET Core Series



Where is Startup class? | .NET 6 | Getting Started With ASP.NET Core Series

Where is Startup class? | .NET 6 | Getting Started With ASP.NET Core Series

Hey 👋, It’s been well over a year since the Startup.cs class has gone missing, but I still get asked about it. So let’s find out where exactly it went and what happened.

The Startup.cs class was responsible for configuring the applications request pipeline and the required services by setting up the Dependency Injection pipeline. However, that was back with .NET 3.1 and .NET 5.

Since .NET 6 came out, which has been well over a year, the Startup.cs file is no longer part of the default application templates. This change came along with the new .NET 6 minimal hosting model, which requires only a single file – that is, the `Program.cs`.

00:00 Introduction
01:48 Comparing .NET 3.1 and .NET 6 Startup code
03:36 Refactoring to Startup.cs in .NET 6
07:36 Introduce Startup class
12:24 Conclusion

Additional Watching
📹 Configuration – https://youtu.be/5GlgHV_12-k
📹Dependency Injection – https://youtu.be/YR6HkvNBpX4
📹Middleware – https://youtu.be/5eifH7LEnGo
📹ASP NET Core Series – https://bit.ly/aws-net-series
📹AWS Series – https://bit.ly/aws-net-series
📹Azure Series – https://bit.ly/azure-series

Come say hi! ✋
🌍 Blog – https://rahulpnath.com/
✉ Subscribe to my Newsletter – https://www.rahulpnath.com/subscribe
🐦Twitter – https://twitter.com/rahulpnath
📸Instagram – https://www.instagram.com/rahulpnath/

🎥 Recording Setup and Workflow – https://www.rahulpnath.com/blog/youtube_setup_and_workflow/

Make sure to SUBSCRIBE to the channel. THANK YOU for helping me grow this channel !!

Comments are closed.