Last active
June 30, 2021 07:14
-
-
Save gistlyn/cc4a82e9c3edcd424b20582c8fda4627 to your computer and use it in GitHub Desktop.
routing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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