File tree 1 file changed +12
-10
lines changed
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
19
19
public static IDIContainerProvider RegisterAll (this IDIContainerProvider containerProvider )
20
20
{
21
21
containerProvider .RegisterSimplifyWeb ()
22
- .RegisterJsonModelBinder ()
23
22
.RegisterSimplifyWebPostman ();
24
23
25
24
return containerProvider ;
26
25
}
27
26
}
28
27
```
29
28
30
- 2 . Add ` GeneratePostmanData ` after Simplify registration and container setup
29
+ 2 . Use ` GeneratePostmanData ` after Simplify registration and container setup
31
30
32
31
``` 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 ();
37
39
38
- app .UseSimplifyWebWithoutRegistrations ();
40
+ if (builder .Environment .IsDevelopment ())
41
+ DIContainer .Current .GeneratePostmanData ();
39
42
40
- DIContainer . Current . RegisterAll (). Verify ();
43
+ app . UseSimplifyWeb ();
41
44
42
- if (env .IsDevelopment ())
43
- DIContainer .Current .GeneratePostmanData ();
45
+ await app .RunAsync ();
44
46
}
45
47
```
46
48
You can’t perform that action at this time.
0 commit comments