Skip to content

Instantly share code, notes, and snippets.

@jpvelasco
Last active March 24, 2017 07:12
Show Gist options
  • Save jpvelasco/1741f49817a0915e1d9794e73a149a53 to your computer and use it in GitHub Desktop.
Save jpvelasco/1741f49817a0915e1d9794e73a149a53 to your computer and use it in GitHub Desktop.
Get Clients endpoint
// 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