public IHttpActionResult Get(int id) { try { var tran = Factory.CreateViewReviewsForRestaurantTransaction(id); tran.Execute(); if (tran.Response.WasSucessfull) { var reviews = ViewModelMapper.ConvertDomainReviewToViewModel(tran.Response.Reviews); return(Ok(reviews)); } else { return(BadRequest()); } } catch (RestaurantNotFoundException) { return(NotFound()); } catch (Exception ex) { Logger.ErrorLog($"Web API failed getting restaurant id {id}", ex); return(InternalServerError()); } }