Skip to content

Instantly share code, notes, and snippets.

@jpvelasco
Last active March 24, 2017 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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