Skip to content

Commit 748525b

Browse files
committed
Add Hello Service
1 parent 3aebc21 commit 748525b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using ServiceStack;
2+
using TechStacks.ServiceModel;
3+
4+
namespace TechStacks.ServiceInterface;
5+
6+
public class HelloService : Service
7+
{
8+
public object Any(Hello request) =>
9+
new HelloResponse { Result = $"Hello, {request.Name}!" };
10+
}

TechStacks.ServiceModel/Hello.cs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using ServiceStack;
2+
3+
namespace TechStacks.ServiceModel;
4+
5+
[Route("/hello")]
6+
[Route("/hello/{Name}")]
7+
public class Hello : IReturn<HelloResponse>
8+
{
9+
public string Name { get; set; }
10+
}
11+
12+
public class HelloResponse
13+
{
14+
public string Result { get; set; }
15+
public ResponseStatus ResponseStatus { get; set; }
16+
}

0 commit comments

Comments
 (0)