-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGlobal.asax.cs
44 lines (40 loc) · 1.46 KB
/
Global.asax.cs
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
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace Zetbox.HR.ASPNET
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Autofac;
using Autofac.Integration.Mvc;
using Zetbox.API;
using Zetbox.API.Utils;
using Zetbox.Client;
using Zetbox.Client.ASPNET;
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
public class MvcApplication : ZetboxMvcApplication
{
public override void RegisterGlobalFilters(GlobalFilterCollection filters)
{
WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
}
public override void RegisterRoutes(RouteCollection routes)
{
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
AuthConfig.RegisterAuth();
}
protected override void ConfigureContainerBuilder(Autofac.ContainerBuilder builder)
{
base.ConfigureContainerBuilder(builder);
// Register target applications specific Controller and ViewModels
builder.RegisterControllers(typeof(MvcApplication).Assembly);
builder.RegisterViewModels(typeof(MvcApplication).Assembly);
}
}
}