Last active
March 24, 2017 07:12
-
-
Save jpvelasco/1741f49817a0915e1d9794e73a149a53 to your computer and use it in GitHub Desktop.
Get Clients endpoint
This file contains 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
// GET: api/Clients | |
[HttpGet("") | |
public IActionResult GetClients() | |
{ | |
var result = _context.Clients.Select(client => new Client() | |
{ | |
ClientId = client.ClientId, | |
FirstName = client.FirstName, | |
LastName = client.LastName, | |
Appointments = client.Appointments | |
}).ToList(); | |
return Ok(result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment