public ActionResult Edit(PlayerViewModel viewModel)
 {
     if (ModelState.IsValid)
     {
         var model = Mapper.Map<Player>(viewModel);
         model.Team = RavenSession.Load<Team>(viewModel.TeamId);
         RavenSession.Store(model);
         return RedirectToAction("Index");
     }
     InitialiseTeamList();
     return View(viewModel);
 }
        public ActionResult Create(PlayerViewModel viewModel)
        {
            if (ModelState.IsValid)
            {
                var player = Mapper.Map<Player>(viewModel);
                player.Team = RavenSession.Load<Team>(viewModel.TeamId);
                RavenSession.Store(player, "players/");
                return RedirectToAction("Index");
            }

            return View(viewModel);
        }