commit
857f42a947
|
@ -321,14 +321,10 @@ app.Run();
|
|||
// <snippet_sampleproblemdetailswriter>
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
// addd SampleProblemDetailsWriter to dependency injection
|
||||
builder.Services.AddTransient<IProblemDetailsWriter, SampleProblemDetailsWriter>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
|
||||
// Middleware to handle writing problem details to the response.
|
||||
app.Use(async (context, next) =>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue