public IActionResult GetDish(Guid restaurantId, Guid dishId) { try { return(new ObjectResult(Models.Dish.MapFromEntity(_dishInteractor.GetDish(dishId)))); } catch (EntityNotFoundException) { return(new NotFoundResult()); } }
public IActionResult GetDishReview(Guid userId, Guid dishReviewId) { try { var review = Models.DishReview.MapFromEntity(_dishReviewInteractor.GetDishReview(dishReviewId)); review.Dish = Models.Dish.MapFromEntity(_dishInteractor.GetDish(review.DishId)); review.Restaurant = Models.Restaurant.MapFromEntity(_restaurantInteractor.GetRestaurant(review.Dish.RestaurantId)); return(new ObjectResult(review)); } catch (EntityNotFoundException) { return(new NotFoundResult()); } }