6 posts about Program.cs by 5 contributors.
Know Program.cs? Share what you know with developers who are learning it.
Learn how to use IDesignTimeDbContextFactory to create an EF Core DbContext for migrations without running Program.cs or the ASP.NET Core startup pipeline.
Learn why EF Core design-time migrations can log HostAbortedException and table-sharing warnings, and how to update Program.cs and entity relationships to resolve them.
A complete guide to configuring database connections in ASP.NET Core using EF Core. Learn how to use IDesignTimeDbContextFactory, configure DbContext in Program.cs/Startup.cs, and use the OnConfiguring fallback method for design-time and runtime scenarios.
Explains why .NET 6 unified Startup.cs and Program.cs, covering the minimal hosting model, reduced boilerplate, Minimal APIs, configuration, and migration trade-offs.
Create a custom middleware in .NET Core to handle unhandled exceptions, and log errors, and return a user-friendly JSON response. Integrate it into the pipeline and test with endpoints to ensure robust error management.
Learn about the role of Program.cs and Startup.cs in ASP.NET Core applications. Understand their functions, including configuring the HTTP pipeline, middleware, and dependency injection. Explore various methods like ConfigureServices and Configure, along with middleware extensions like UseMvc and UseHttpsRedirection.
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterPublish an article in this category and earn +1,000 SHARP when it is approved.
Write an article