public async Task <IActionResult> Delete(int id) { House house = await service.GetByIdAsync(id); if (house == null) { logger.LogInformation($"{DateTime.Now.ToString()} DELETE request returned NotFound"); return(NotFound()); } logger.LogInformation($"{DateTime.Now.ToString()} DELETE request successfully deleted House with id={id}"); await service.DeleteAsync(id); return(Ok(house)); }