public async Task <House> getHouseById(string id) { var res = await _housesService.getHouseById(id); if (res == null) { NotFound(); } return(res); }
public ActionResult <House> getHouseById(string houseId) { try { House houseToGet = _hs.getHouseById(houseId); return(Ok(houseToGet)); } catch (Exception e) { return(BadRequest(e.Message)); } }