Exemple #1
0
        public ActionResult Create(CreateInitiativeViewModel createInitiative)
        {
            try
            {
                if (createInitiative == null)
                {
                    throw new ArgumentNullException("createInitiative");
                }

                var developerName = _accountRepository.FindById(User.Identity.GetUserId()).Email;
                _initiativeBusiness.Create(developerName, createInitiative.Name);

                return(RedirectToAction("Index"));
            }
            catch (Exception exception)
            {
                ViewBag.Message = exception.Message;
                return(View());
            }
        }