Exemplo n.º 1
0
        // GET: Edit/Details/5
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var beer = _repo.Find(id.Value);

            if (beer == null)
            {
                return(NotFound());
            }

            return(View(beer));
        }
        public ActionResult Details(string id)
        {
            Beer beer = null;

            try
            {
                beer            = Repository.Find(id);
                ViewBag.Success = true;
            }
            catch (CouchbaseDataException e)
            {
                ViewBag.Success = false;
                ViewBag.Message = e.Message;
                ViewBag.Status  = e.Status;
            }
            return(View(beer));
        }
Exemplo n.º 3
0
 // GET: Beer/Details/5
 public ActionResult Details(string id)
 {
     return(View(_repository.Find(id)));
 }