Last active
June 30, 2021 07:13
-
-
Save gistlyn/26231f929d4852b105758bd94676341b to your computer and use it in GitHub Desktop.
api-design
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
var client = new JsonServiceClient(baseUrl); | |
List<Contact> response = client.Get(new GetContacts()); |
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
public class Contact | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
} | |
[Route("/contacts")] | |
public class GetContacts : IReturn<List<Contact>> { } | |
public class ContactsService : Service | |
{ | |
public object Any(GetContacts request) => | |
Db.Select<Contact>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment