Skip to content

Commit 6f00ad2

Browse files
committed
[edit] readme
1 parent bf0f426 commit 6f00ad2

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

Diff for: README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,30 @@ public static class IocRegistrations
1919
public static IDIContainerProvider RegisterAll(this IDIContainerProvider containerProvider)
2020
{
2121
containerProvider.RegisterSimplifyWeb()
22-
.RegisterJsonModelBinder()
2322
.RegisterSimplifyWebPostman();
2423

2524
return containerProvider;
2625
}
2726
}
2827
```
2928

30-
2. Add `GeneratePostmanData` after Simplify registration and container setup
29+
2. Use `GeneratePostmanData` after Simplify registration and container setup
3130

3231
```csharp
33-
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
34-
{
35-
if (env.IsDevelopment())
36-
app.UseDeveloperExceptionPage();
32+
DIContainer.Current
33+
.RegisterAll()
34+
.Verify();
35+
36+
var builder = WebApplication.CreateBuilder(args);
37+
38+
var app = builder.Build();
3739

38-
app.UseSimplifyWebWithoutRegistrations();
40+
if (builder.Environment.IsDevelopment())
41+
DIContainer.Current.GeneratePostmanData();
3942

40-
DIContainer.Current.RegisterAll().Verify();
43+
app.UseSimplifyWeb();
4144

42-
if (env.IsDevelopment())
43-
DIContainer.Current.GeneratePostmanData();
45+
await app.RunAsync();
4446
}
4547
```
4648

0 commit comments

Comments
 (0)