Пример #1
0
        public IActionResult AddReview(int StoreId, int StoreItemId, Review r)
        {
            if (ModelState.IsValid)
            {
                r.StoreItemId = StoreItemId;
                r.PosterId    = User.Identity.GetPersonId();
                r.DatePosted  = DateTime.Now;
                storeService.AddReview(r);
                return(RedirectToAction("StoreItem", new { StoreId = StoreId, StoreItemId = StoreItemId }));
            }

            return(RedirectToAction("StoreItem", new { StoreId = StoreId, StoreItemId = StoreItemId }));
        }