112
|
1 using System;
|
|
2 using System.Web;
|
|
3 using Funq;
|
|
4 using SSRS.Services;
|
114
|
5 using SSRS.Services.DTO;
|
112
|
6 using ServiceStack.WebHost.Endpoints;
|
|
7
|
|
8 namespace SSRS.Web
|
|
9 {
|
|
10 public class AppHost : AppHostBase
|
|
11 {
|
|
12 public AppHost() :
|
|
13 base("REST Services",
|
|
14 typeof(ReportsService).Assembly) {}
|
|
15
|
|
16 public override void Configure(Container container)
|
|
17 {
|
|
18 Routes.Add<ReportsRequest>("reports", "POST");
|
|
19 }
|
|
20 }
|
|
21
|
|
22 public class Global : HttpApplication
|
|
23 {
|
|
24 protected void Application_Start(object sender, EventArgs e)
|
|
25 {
|
|
26 new AppHost().Init();
|
|
27 }
|
|
28 }
|
|
29 } |