public async Task <IActionResult> Get(int id) { House house = await service.GetByIdAsync(id); if (house == null) { logger.LogInformation($"{DateTime.Now.ToString()} GET request returned BadRequest"); return(BadRequest()); } logger.LogInformation($"{DateTime.Now.ToString()} GET request returned House with id={id}"); return(Ok(house)); }