public IActionResult Create()
        {
            CreateAdventureViewModel viewModel = new CreateAdventureViewModel();

            viewModel.Adventure = new Adventure();
            return(View(viewModel));
        }
        public async Task <IActionResult> Create(CreateAdventureViewModel viewModel)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    _context.Add(viewModel.Adventure);
                    await _context.SaveChangesAsync();

                    return(RedirectToAction(nameof(Index)));
                }
                catch (Exception)
                {
                    return(Redirect("~/Views/Shared/Error.cshtml"));
                }
            }
            return(View(viewModel));
        }