Skip to content

Instantly share code, notes, and snippets.

@juanluelguerre
Last active October 12, 2018 18:31
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 juanluelguerre/ba5b2c3abe11630d6ca335c560139afc to your computer and use it in GitHub Desktop.
Save juanluelguerre/ba5b2c3abe11630d6ca335c560139afc to your computer and use it in GitHub Desktop.
public ProjectsController(
IProjectService service,
ILogger<ProjectsController> logger)
{
_service = service;
_logger = logger;
}
[HttpGet]
public async Task<ActionResult<IEnumerable<ProjectModel>>> GetAll()
{
_logger.LogInformation($"Staring {nameof(GetAll)} ...");
var response = await _service.GetAsync();
_logger.LogInformation($"Ending {nameof(GetAll)} ...");
return Ok(response);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment