Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Global.asax.cs 890 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  1. using System.Reflection;
  2. using System.Web.Http;
  3. using Autofac;
  4. using Autofac.Integration.WebApi;
  5. using Microsoft.Bot.Builder.Dialogs.Internals;
  6. using Zummer.Modules;
  7. namespace Zummer
  8. {
  9. public class WebApiApplication : System.Web.HttpApplication
  10. {
  11. protected void Application_Start()
  12. {
  13. var builder = new ContainerBuilder();
  14. builder.RegisterModule(new DialogModule());
  15. builder.RegisterModule(new MainModule());
  16. var config = GlobalConfiguration.Configuration;
  17. builder.RegisterApiControllers(Assembly.GetExecutingAssembly());
  18. builder.RegisterWebApiFilterProvider(config);
  19. var container = builder.Build();
  20. config.DependencyResolver = new AutofacWebApiDependencyResolver(container);
  21. GlobalConfiguration.Configure(WebApiConfig.Register);
  22. }
  23. }
  24. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...