Skip to content

Commit

Permalink
Add Hello Service
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Oct 14, 2023
1 parent 3aebc21 commit 748525b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions TechStacks.ServiceInterface/HelloService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using ServiceStack;
using TechStacks.ServiceModel;

namespace TechStacks.ServiceInterface;

public class HelloService : Service
{
public object Any(Hello request) =>
new HelloResponse { Result = $"Hello, {request.Name}!" };
}
16 changes: 16 additions & 0 deletions TechStacks.ServiceModel/Hello.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using ServiceStack;

namespace TechStacks.ServiceModel;

[Route("/hello")]
[Route("/hello/{Name}")]
public class Hello : IReturn<HelloResponse>
{
public string Name { get; set; }
}

public class HelloResponse
{
public string Result { get; set; }
public ResponseStatus ResponseStatus { get; set; }
}

0 comments on commit 748525b

Please sign in to comment.