public ActionResult Create()
        {
            var model = new TeamBetTeamXViewModel();
            model.BetTeamList = new SelectList (_betTeamService.GetAll(), SelectLists.DataValueField, SelectLists.DataTextField, SelectLists.UnitializedSelectValue);
            model.TeamList = new SelectList (_teamService.GetAll(), SelectLists.DataValueField, SelectLists.DataTextField, SelectLists.UnitializedSelectValue);

            return View(model);
        }
        public ActionResult Create(TeamBetTeamXViewModel model)
        {
            if (ModelState.IsValid)
            {
                var businessObject = new BOTeamBetTeamX();
                Mapper.Map<TeamBetTeamXViewModel, BOTeamBetTeamX>(model, businessObject);

                businessObject.BetTeam = new BOBetTeam(model.BetTeamListID);
                businessObject.Team = new BOTeam(model.TeamListID);

                _teambetteamxService.Save(businessObject);

                return RedirectToAction("Index");
            }
            model.BetTeamList = new SelectList (_betTeamService.GetAll(), SelectLists.DataValueField, SelectLists.DataTextField, SelectLists.UnitializedSelectValue);
            model.TeamList = new SelectList (_teamService.GetAll(), SelectLists.DataValueField, SelectLists.DataTextField, SelectLists.UnitializedSelectValue);

            return View(model);
        }
 public ActionResult EditProperties(TeamBetTeamXViewModel model)
 {
     return PartialView("_teamBetTeamX", model);
 }
        public ActionResult Edit(TeamBetTeamXViewModel model)
        {
            if (ModelState.IsValid)
            {
                BOTeamBetTeamX businessObject = _teambetteamxService.GetById(model.ID);
                Mapper.Map<TeamBetTeamXViewModel, BOTeamBetTeamX>(model, businessObject);

                _teambetteamxService.Save(businessObject);

                return RedirectToAction("Index");
            }

            return View(model);
        }