/
Global.asax.cs
36 lines (33 loc) · 1.11 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
using System;
using ServiceStack;
using StarterTemplates.Common;
using Funq;
namespace RootPath40
{
/// <summary>
/// Create your ServiceStack web service application with a singleton AppHost.
/// </summary>
public class AppHost : AppHostBase
{
/// <summary>
/// Initializes a new instance of your ServiceStack application, with the specified name and assembly containing the services.
/// </summary>
public AppHost() : base("StarterTemplate ASP.NET Host", typeof(HelloService).Assembly) { }
/// <summary>
/// Configure the container with the necessary routes for your ServiceStack application.
/// </summary>
/// <param name="container">The built-in IoC used with ServiceStack.</param>
public override void Configure(Container container)
{
container.Register(new TodoRepository());
}
}
public class Global : System.Web.HttpApplication
{
void Application_Start(object sender, EventArgs e)
{
//Initialize your application
(new AppHost()).Init();
}
}
}