Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active June 30, 2021 07:14
Show Gist options
  • Save gistlyn/cc4a82e9c3edcd424b20582c8fda4627 to your computer and use it in GitHub Desktop.
Save gistlyn/cc4a82e9c3edcd424b20582c8fda4627 to your computer and use it in GitHub Desktop.
routing
[Route("/hello")]
[Route("/hello/{Name}")]
public class Hello : IReturn<HelloResponse>
{
public string Name { get; set; }
}
public class HelloResponse
{
public string Result { get; set; }
}
public class MyServices : Service
{
public object Any(Hello request) =>
new HelloResponse {
Result = $"Hello, {request.Name}!"
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment