Пример #1
0
        public async Task <IActionResult> Create([Bind("Id,HotelId,UserId,Description,Stars")] Review review, int?hotelId)
        {
            if (hotelId == null || review == null)
            {
                return(RedirectToAction("Index", "Home"));
            }

            await _portalService.CreateReviewAsync(hotelId, review);

            return(RedirectToAction("Details", "Hotels", new { id = hotelId }));
        }