public IHttpActionResult Get(int id) { try { var tran = Factory.CreateViewRestaurantsForCuisineTransaction(id); tran.Execute(); if (tran.Response.WasSucessfull) { var rest = ViewModelMapper.ConvertDomainRestaurantGroupToViewModel(tran.Response.Restaurants); return(Ok(rest)); } return(BadRequest()); } catch (CuisineNotFoundException) { return(NotFound()); } catch (Exception ex) { Logger.ErrorLog($"Web API failed getting restaurant id {id}", ex); return(InternalServerError()); } }