public IActionResult Get(int id) { try { var house = _houseService.Get(id); var houseModels = house.ToApiModel(); return(Ok(houseModels)); } catch (System.Exception ex) { ModelState.AddModelError("GetHouse", ex.Message); return(BadRequest(ModelState)); } }