Created
October 25, 2025 14:27
-
-
Save wullemsb/f6cfc29ea2efa9e6c529e7d55fe6a311 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var builder = WebApplication.CreateBuilder(args); | |
| builder.Services.AddScoped<OrderService>(); | |
| // Still forgot IPaymentProcessor... | |
| // Enable validation | |
| builder.Host.UseServiceProviderFactory(new ServiceProviderFactory( | |
| new ServiceProviderOptions | |
| { | |
| ValidateOnBuild = true | |
| })); | |
| var app = builder.Build(); // Throws exception here! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment