Example #1
0
        // GET: Spotz/Details/5
        public async Task <ActionResult> Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Spotz spotz = await _db.Spotzes.FindAsync(id);

            if (spotz == null)
            {
                return(HttpNotFound());
            }

            var vm = new SpotzDetailViewModel(spotz);

            return(View(vm));
        }
Example #2
0
        // GET: Spotz/Details/5
        public async Task <ActionResult> Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var spotz = await _dbRepository.GetSpotzAsync(id.Value);

            if (spotz == null)
            {
                return(HttpNotFound());
            }

            var vm = new SpotzDetailViewModel(spotz);

            return(View(vm));
        }