File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
StarterTemplates/WinServiceAppHost Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 8
8
9
9
namespace ServiceStack . MovieRest
10
10
{
11
- [ RestService ( "/reset-movies" ) ]
11
+ [ RestService ( "/reset-movies" , "GET,POST ") ]
12
12
[ Description ( "Resets the database back to the original Top 5 movies." ) ]
13
13
public class ResetMovies { }
14
14
public class ResetMoviesResponse { }
@@ -26,7 +26,12 @@ public class ResetMoviesService : RestServiceBase<ResetMovies>
26
26
27
27
public IDbConnectionFactory DbFactory { get ; set ; }
28
28
29
- public override object OnPost ( ResetMovies request )
29
+ public override object OnGet ( ResetMovies request )
30
+ {
31
+ return OnPost ( request ) ;
32
+ }
33
+
34
+ public override object OnPost ( ResetMovies request )
30
35
{
31
36
DbFactory . Exec ( dbCmd =>
32
37
{
Original file line number Diff line number Diff line change 36
36
<Reference Include =" ServiceStack" >
37
37
<HintPath >..\..\..\lib\ServiceStack.dll</HintPath >
38
38
</Reference >
39
+ <Reference Include =" ServiceStack.Interfaces" >
40
+ <HintPath >..\..\..\lib\ServiceStack.Interfaces.dll</HintPath >
41
+ </Reference >
39
42
<Reference Include =" System" />
40
43
<Reference Include =" System.Configuration.Install" />
41
44
<Reference Include =" System.Core" />
78
81
</ItemGroup >
79
82
<ItemGroup >
80
83
<Content Include =" default.htm" >
81
- <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
82
- </Content >
84
+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
85
+ </Content >
83
86
</ItemGroup >
84
87
<Import Project =" $(MSBuildToolsPath)\Microsoft.CSharp.targets" />
85
88
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
You can’t perform that action at this time.
0 commit comments