public IHttpActionResult GetRestaurantMenus(int restaurantId) { var restaurantDto = new RestaurantDto(restaurantId); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var restaurantBillSplitterManager = new RestaurantBillSplitterManager(); var response = restaurantBillSplitterManager.GetRestaurantMenus(restaurantDto.RestaurantId); if (response.Error != null) { return(BadRequest(response.Error)); } return(Ok(response)); } catch (Exception) { return(InternalServerError()); } }