File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ These packages provide integration with ASP.NET Core and the built-in container
1212
1313Adds integration with the ASP.NET Core hosting mechanism.
1414
15- > :warning : For this integration package to work properly, you need version 1.1 of ASP.NET Core
16-
1715### Installation
1816
1917Add ` StructureMap.AspNetCore ` to your project:
@@ -36,20 +34,17 @@ using System.IO;
3634using Microsoft .AspNetCore .Hosting ;
3735using StructureMap .AspNetCore ;
3836
39- public class Program
37+ public static class Program
4038{
4139 public static void Main (string [] args )
4240 {
43- var host = new WebHostBuilder ()
44- .UseContentRoot (Directory .GetCurrentDirectory ())
45- .UseStartup <Startup >()
46- .UseIISIntegration ()
47- .UseStructureMap ()
48- .UseKestrel ()
49- .Build ();
50-
51- host .Run ();
41+ CreateWebHostBuilder (args ).Build ().Run ();
5242 }
43+
44+ public static IWebHostBuilder CreateWebHostBuilder (string [] args ) =>
45+ WebHost .CreateDefaultBuilder (args )
46+ .UseStructureMap () // Add support for StructureMap
47+ .UseStartup <Startup >();
5348}
5449```
5550
You can’t perform that action at this time.
0 commit comments