BeerniqueWeb.Controllers.BeersController.Details C# (CSharp) Method

Details() private method

private Details ( System.Web.Mvc.FormCollection coll ) : System.Web.Mvc.ActionResult
coll System.Web.Mvc.FormCollection
return System.Web.Mvc.ActionResult
        public ActionResult Details(FormCollection coll)
        {
            var beerId = "beer_" + Server.UrlDecode(coll["id"]).Replace(" ", "_");
            if (_Client.Get(beerId) == null)
            {
                return HttpNotFound();
            }

            var hashedEmail = HashHelper.Hash(SessionUser.Current.Email);
            if (_Client.Get(hashedEmail) != null)
            {
                var data = new ArraySegment<byte>(Encoding.Default.GetBytes('|' + beerId));
                _Client.Append(hashedEmail, data);
            }
            else
            {
                _Client.Store(StoreMode.Set, hashedEmail, beerId);
            }

            return RedirectToAction("Details", new { id = coll["id"] });
        }

Same methods

BeersController::Details ( string id ) : System.Web.Mvc.ActionResult
BeersController