public void Create(RestaurantReviewCreateModel entity)
        {
            RestaurantReview restaurantReview = new RestaurantReview
            {
                Id           = new Guid(),
                NameUser     = entity.NameUser,
                CommentDate  = entity.CommentDate,
                Order        = entity.Order,
                Comment      = entity.Comment,
                Rating       = entity.Rating,
                RestaurantId = entity.RestaurantId
            };

            _restaurantReviewRepository.Create(restaurantReview);
            _restaurantReviewRepository.Save();
        }
示例#2
0
 public IActionResult Create([FromBody] RestaurantReviewCreateModel review)
 {
     _restaurantReviewLogic.Create(review);
     return(Ok());
 }