예제 #1
0
        public async Task <House> getHouseById(string id)
        {
            var res = await _housesService.getHouseById(id);

            if (res == null)
            {
                NotFound();
            }
            return(res);
        }
예제 #2
0
 public ActionResult <House> getHouseById(string houseId)
 {
     try
     {
         House houseToGet = _hs.getHouseById(houseId);
         return(Ok(houseToGet));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }