Instantly share code, notes, and snippets.

Embed
What would you like to do?
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