If you’re a developer used to working with ASP.NET Core, you should be familiar with the nightmare that is startup file organization. Every ASP Core application startup file can include configurations, middleware declaration, dependency injection definition, authentication configs, and policies amongst. Long story short, heavy applications can have large, messy, unreadable startup files with hundreds of lines of hard-to-scroll-through code.

Gordon on ASP.NET’s startup file organization

So, as you might have guessed, here is where extension methods come to the rescue. Learning to organize your Startup.cs is part of being a good C# programmer; having extension methods in your arsenal is a must. By the end of this article, you will learn a neat and simple trick to improve the organization of your startup files and spare yourself the pain of endless startup file scrolling in your future projects. 

If you’re a developer used to working with ASP.NET Core, you should be familiar with the nightmare that is startup file organization. Every ASP Core application startup file can include configurations, middleware declaration, dependency injection definition, authentication configs, and policies amongst. Long story short, heavy applications can have large, messy, unreadable startup files with hundreds of lines of hard-to-scroll-through code.
Gordon on ASP.NET’s startup file organization
So, as you might have guessed, here is where extension methods come to the rescue. Learning to organize your Startup.cs is part of being a good C# programmer; having extension methods in your arsenal is a must. By the end of this article, you will learn a neat and simple trick to improve the organization of your startup files and spare yourself the pain of endless startup file scrolling in your future projects.&nbs […]