File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments